Tomcat migration from T5 to T5.5 mail
Hello, I'm migrating a Tomcat Cluster, when I thought everything was working fine, session cluster, balancing,etc, I noticed that the mails were not send by the java aplication. I installed the library mail.jar and activation.jar and configured the web.xml and the context.xml as the Official Tomcat notes say. The aplication has not changed and can't change, and it works perfect in the old installed Tomcat 5. The error that I get when the application tries to send the mail is: javax.mail.NoSuchProviderException: smtp at javax.mail.Session.getService(Session.java:760) at javax.mail.Session.getTransport(Session.java:685) at javax.mail.Session.getTransport(Session.java:628) ... # More errors lije that I have read in some forums that the problem could be that Tomcat is loading that libraries 2 times. I have checked everything and the only folder they are is $CATALINA_HOME/common/lib and they're not in any other place like $CATALINA_HOME/shared/lib or $CATALINA_HOME/webapps/myapplication/* Anyone has any idea why I have this error? Thank you very much -- View this message in context: http://www.nabble.com/Tomcat-migration-from-T5-to-T5.5-mail-tp19739822p19739822.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat migration from T5 to T5.5 mail
Hello, Firt of all thanks for your fast answer. - My Java versión is jdk1.5.0_06, it's the same that is using the old Tomcat 5 and it works. Anyway I've tried to remove aplication.jar and an error asks for him. - I've tested my linux system "mail" function and it works, the aplication deployed in Tomcat 5 works too. - My context.xml is: - What i've done to configure the mail is the same as your guide Albretch says: 1. Copy mail.jar and activation.jar to $CATALINA_HOME/common/lib 2. Edit context.xml and add the ressource mail/Session: 3. Edit web.xml and add the resource-ref: Resource reference to a factory for javax.mail.Session instances that may be used for sending electronic mail messages, preconfigured to connect to the appropriate SMTP server. mail/Session javax.mail.Session Container 4. The code is written and tested. Any idea? -- View this message in context: http://www.nabble.com/Tomcat-migration-from-T5-to-T5.5-mail-tp19739822p19740598.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat migration from T5 to T5.5 mail
Hello, Here is the result of a find in the tomcat5.5 directory #> find /usr/local/tomcat5.5_svh/ -name "*mail*" /usr/local/tomcat5.5_svh/common/lib/mail.jar #> Is there any path that Tomcat could be loading? If I move mail.jar out of $CATALINA_HOME it says the same: javax.mail.NoSuchProviderException: No provider for smtp at javax.mail.Session.getProvider(Session.java:433) at javax.mail.Session.getTransport(Session.java:627) ... If I move mail.jar out of $CATALINA_HOME it says: javax.servlet.ServletException: javax/activation/DataSource org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774) ... -- View this message in context: http://www.nabble.com/Tomcat-migration-from-T5-to-T5.5-mail-tp19739822p19743187.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat migration from T5 to T5.5 mail
Sorry the second error was obviosly without activation.jar, no mail.jar again. AlexM3 wrote: > > Hello, > > Here is the result of a find in the tomcat5.5 directory > #> find /usr/local/tomcat5.5_svh/ -name "*mail*" > /usr/local/tomcat5.5_svh/common/lib/mail.jar > #> > > Is there any path that Tomcat could be loading? > > If I move mail.jar out of $CATALINA_HOME it says the same: > javax.mail.NoSuchProviderException: No provider for smtp > at javax.mail.Session.getProvider(Session.java:433) > at javax.mail.Session.getTransport(Session.java:627) > ... > > If I move mail.jar out of $CATALINA_HOME it says: > javax.servlet.ServletException: javax/activation/DataSource > > org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841) > > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774) > ... > > > -- View this message in context: http://www.nabble.com/Tomcat-migration-from-T5-to-T5.5-mail-tp19739822p19744101.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat migration from T5 to T5.5 mail
Resolved!!! There was a mailapi.jar in the application. Tomcat 5 priorzed his library in front of that one, however, the new Tomcat 5.5 prioriced that aplication library before his lib and it crashed. Is there any place where you can configure that? Thanks a lot for your help! -- View this message in context: http://www.nabble.com/Tomcat-migration-from-T5-to-T5.5-mail-tp19739822p19878710.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]