users@glassfish.java.net

Re: NameNotFoundException when looking up mail resource within EAR

From: Shalini Muthukrishnan <Shalini.Muthukrishnan_at_Sun.COM>
Date: Wed, 13 Jan 2010 10:52:45 +0530

Hi,

Do the deployment descriptions have the correct reference before you
lookup this resource?

Thanks,
Shalini.

glassfish_at_javadesktop.org wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>