users@glassfish.java.net

NameNotFoundException when looking up mail resource within EAR

From: <glassfish_at_javadesktop.org>
Date: Tue, 12 Jan 2010 07:23:33 PST

Hi!

We've got the following problem: We have a WAR in which we lookup a mail resource. Everything works perfectly fine, when we deploy this WAR.

When we take the same WAR and put it into an EAR and deploy the EAR on the server, our lookup of the mail resource ends in:

javax.naming.NamingException: Lookup failed for 'java:comp/env/mail/eoc' in SerialContext [Root exception is javax.naming.NameNotFoundException: No object bound to name java:comp/env/mail/eoc]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at de.edict.eoc.core.messaging.Mail.getMailSession(Mail.java:125)
        ... 78 more


Any idea is appriciated and thanks in advance.

Jan
[Message sent by forum member 'janhelwich' (jan.helwich_at_gmx.de)]

http://forums.java.net/jive/thread.jspa?messageID=380322