Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

mail.jar problems

Gerard van Enk

2004-02-03

Replies:

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@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.