You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gerard van Enk <gv...@xs4all.nl> on 2004/02/03 10:54:38 UTC

mail.jar problems

Hello,

I have a problem with mail.jar and Tomcat-5.0.x. A webapp which uses 
javax.mail through jndi only works when this jar is placed inside the 
common/endorsed dir. If it's been placed in WEB-INF/lib this error occurs:

10:10:09,880 ERR 6082 kb org.mmbase.servlet.MMBaseServlet error.74 -
javax/mail/Sessionjava.lang.NoClassDefFoundError: javax/mail/Session
         at
org.apache.naming.factory.MailSessionFactory$1.run(MailSessionFactory.java:163)
         at java.security.AccessController.doPrivileged(Native Method)
         at
org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessionFactory.java:147)
         at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:176)
         at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:837)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:184)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:825)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:197)
         at org.mmbase.module.JMSendMail.init(JMSendMail.java:53)
         at org.mmbase.module.Module.startModule(Module.java:83)
         at org.mmbase.module.Module.startModules(Module.java:282)
         at org.mmbase.module.Module.getModule(Module.java:326)
         at org.mmbase.module.core.MMBase.getMMBase(MMBase.java:428)
         at org.mmbase.servlet.MMBaseServlet.init(MMBaseServlet.java:168)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)

Tomcat 5 doesn't ship with mail.jar, but because of this problem my 
webapp isn't running out of the box and people who want to use it have 
to copy this jar (and activation.jar) manually.

Is there a solution to this problem?

Gerard

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: mail.jar problems

Posted by Michiel Meeuwissen <Mi...@omroep.nl>.
Wade Chandler <wc...@redesetgrow.com> wrote:
> >common/endorsed dir. If it's been placed in WEB-INF/lib this error occurs:

> >Tomcat 5 doesn't ship with mail.jar, but because of this problem my 
> >webapp isn't running out of the box and people who want to use it have 
> >to copy this jar (and activation.jar) manually.
> >
> >Is there a solution to this problem?
> 
> You can distribute your application as a war file and include the jars 
> you need.

Ah, interesting. When an application is a 'war' then the classloader works
differently? How about when the war is unpacked? Is there any difference
then between an unpacked war and just a web-app?

Michiel

-- 
Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
nl_NL eo_XX en_US
mihxil'
 [] ()

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: mail.jar problems

Posted by Wade Chandler <wc...@redesetgrow.com>.
Gerard van Enk wrote:
> Hello,
> 
> I have a problem with mail.jar and Tomcat-5.0.x. A webapp which uses 
> javax.mail through jndi only works when this jar is placed inside the 
> common/endorsed dir. If it's been placed in WEB-INF/lib this error occurs:
> 
> 10:10:09,880 ERR 6082 kb org.mmbase.servlet.MMBaseServlet error.74 -
> javax/mail/Sessionjava.lang.NoClassDefFoundError: javax/mail/Session
>         at
> org.apache.naming.factory.MailSessionFactory$1.run(MailSessionFactory.java:163) 
> 
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessionFactory.java:147) 
> 
>         at
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:176) 
> 
>         at
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:837)
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:184)
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:825)
>         at org.apache.naming.NamingContext.lookup(NamingContext.java:197)
>         at org.mmbase.module.JMSendMail.init(JMSendMail.java:53)
>         at org.mmbase.module.Module.startModule(Module.java:83)
>         at org.mmbase.module.Module.startModules(Module.java:282)
>         at org.mmbase.module.Module.getModule(Module.java:326)
>         at org.mmbase.module.core.MMBase.getMMBase(MMBase.java:428)
>         at org.mmbase.servlet.MMBaseServlet.init(MMBaseServlet.java:168)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044) 
> 
> 
> Tomcat 5 doesn't ship with mail.jar, but because of this problem my 
> webapp isn't running out of the box and people who want to use it have 
> to copy this jar (and activation.jar) manually.
> 
> Is there a solution to this problem?
> 
> Gerard
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 

You can distribute your application as a war file and include the jars 
you need.

Wade



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org