tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "e-Denton Subscriber" <subscri...@e-denton.com>
Subject Re: Tomcat 5.0 and JavaMail - solved?
Date Thu, 08 Jul 2004 14:10:43 GMT
You're right! Thanks! My Tomcat 5.0.25 common/lib/naming-factory.jar doesn't
contain a org.apache.naming.factory.MailSessionFactory I'll try your
solution.

Thanks to the other posters as well. (I did forget activation.jar, even
though I hadn't hit that problem yet).

----- Original Message ----- 
From: "David Smith" <dns4@cornell.edu>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, July 08, 2004 8:34 AM
Subject: Re: Tomcat 5.0 and JavaMail


> <opinion>
>   Don't get in the habit of putting jars in java_home/jre/lib/ext.
> Those jars get loaded before everything and ugly version conflicts among
> other problems show up.
> </opinion>
>
> I have a different take on your problem.  Are you using Tomcat 5.0.25?
> If so, you may want to consider upgrading or just stealing
> common/lib/naming-factory.jar from a 5.0.24 version of Tomcat.
> org.apache.naming.factory.MailSessionFactory is missing from tomcat
> 5.0.25.  See this message from the archives:
>
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg128258.html
>
> --David
>
> Aris Javier wrote:
>
> >you don't need to put activation.jar and mail.jar inside
> >catalina_home\common\lib\.... you need to put them inside
> >java_home\jre\lib\ext...
> >
> >regards...
> >aris
> >
> >-----Original Message-----
> >From: Dale, Matt [mailto:Matt.Dale@beCogent.com]
> >Sent: Wednesday, July 07, 2004 11:23 PM
> >To: Tomcat Users List; e-Denton Subscriber
> >Subject: RE: Tomcat 5.0 and JavaMail
> >
> >
> >
> >I've found that you also need activation.jar for JavaMail, do you have
> >this in common/lib too?
> >
> >Ta
> >Matt
> >
> >-----Original Message-----
> >From: e-Denton Subscriber [mailto:subscriber@e-denton.com]
> >Sent: 07 July 2004 15:49
> >To: Tomcat Users List
> >Subject: Tomcat 5.0 and JavaMail
> >
> >
> >I had JavaMail working in Tomcat 4, but in Tomcat 5, I am having
> >trouble. I know it's something simple, perhaps you can see the problem.
> >Mail.jar is in Tomcat 5.0\common\lib.
> >
> >I am getting this error:
> >
> >"javax.naming.NamingException: Cannot create resource instance:"
> >
> >Using this context in Tomcat 5.0\conf\Catalina\localhost\e_Denton.xml
> >
> >"<Context displayName="Portal Application"
> >         debug="5"
> >         docBase="e-Denton"
> >         path="/e-Denton"
> >         reloadable="true"
> >         useNaming="true">
> >
> >    <Loader checkInterval="1" />
> >
> > <Resource name="mail/Session" auth="Container"
> >type="javax.mail.Session" />  <ResourceParams name="mail/Session">
> >  <parameter>
> >   <name>mail.smtp.host</name>
> >   <value>mars.webappcabaret.net</value>
> >  </parameter>
> > </ResourceParams>
> >..."
> >
> >And this web.xml:
> >
> >"<!-- JavaMail Resource -->
> > <resource-ref>
> >  <description>
> >  Resource reference to a factory for javax.mail.Session
> >  preconfigured to connect to the appropriate SMTP server.
> >  </description>
> >  <res-ref-name>mail/Session</res-ref-name>
> >  <res-type>javax.mail.Session</res-type>
> >  <res-auth>Container</res-auth>
> > </resource-ref>"
> >
> >Accessed like this:
> >
> >  "try
> >   {
> >   Context initContext = new InitialContext();
> >   Context envContext  = (Context) initContext.lookup("java:comp/env");
> >   Session session = (Session) envContext.lookup("mail/Session");
> >   }
> >  catch (javax.naming.NamingException ne)"
> >
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


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


Mime
View raw message