I have a problem with my web application deployement on Payara 5.192
I have a class which is injecting a Mail Resource:
@Named
public class MailPlugin extends AbstractPlugin {
public static final String MAIL_SESSION_NAME = "mail/org.imixs.workflow.mail";
@Resource(lookup = MAIL_SESSION_NAME)
Session mailSession;
....
}
I configured the mail resource in the domain.xml file like this:
<resources>
.....
<mail-resource auth="false" host="smarthost" from="
in...@foo.com" user="admin" jndi-name="mail/org.imixs.workflow.mail"></mail-resource>
....
</resources>
But each Time during deployment (or if jvm-options: -Ddeployment.resource.validation=false after the Bean is loaded) I got the following exception:
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/org.imixs.workflow.engine.plugins.MailPlugin/mailSession' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Lookup failed for 'mail/org.imixs.workflow.mail' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming, com.sun.enterprise.naming.logicalName=java:comp/env/org.imixs.workflow.engine.plugins.MailPlugin/mailSession} [Root exception is javax.naming.NameNotFoundException: mail]]
I did not see what is wrong with my setup.
Can anybody help me out here? The same application runs on Wildfly and OpenLibertry. I guess I missed some glassfish-... deployment description?
Thanks for help
===
Ralph