RE: Tomcat 5 and Mail...
Hi, What Tomcat 5 version? Apache Tomcat/5.0 Let's try again: which specific Tomcat 5 version, e.g. 5.0.28? ;) The reason I ask is that I broke the MailSession factory in 5.0.25, so if you're using that build AND a JNDI MailSession factory, that would explain your problem. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 and Mail...
Hi, Well, let's try an even simpler scenario: test it without a SecurityManager. What Tomcat 5 version? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Quinton Delpeche [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 7:14 AM To: [EMAIL PROTECTED] Subject: Tomcat 5 and Mail... Hey Everybody, I picked up a funny. Code that was working perfectly on Tomcat 4 now doesn't run on Tomcat 5 anymore, specifically the sending of the mail. I have narrowed it down to this little piece of code: CODE //Send the message. Transport.send(mesMailer); /CODE I checked my Catalina.policy file and made sure that this entry was there: CATALINA_POLICY permission java.net.SocketPermission mail.server.name:25, connect,resolve ; /CATALINA_POLICY This didn't work, so I added the following options to the Catalina.policy file for each individual application running on the server: CATALINA_POLICY grant codeBase file:${catalina.home}/webapps/ROOT/- { permission java.net.SocketPermission 172.20.5.15:5432, connect; permission java.net.SocketPermission smtp.vippayroll.co.za:25, connect; }; grant codeBase file:${catalina.home}/webapps/consulting/- { permission java.net.SocketPermission mail.server.name:25, connect,resolve; }; grant codeBase file:${catalina.home}/webapps/debtors/- { permission java.net.SocketPermission mail.server.name:25, connect,resolve; }; grant codeBase file:${catalina.home}/webapps/placements/- { permission java.net.SocketPermission mail.server.name:25, connect,resolve; }; grant codeBase file:${catalina.home}/webapps/sales/- { permission java.net.SocketPermission mail.server.name:25, connect,resolve; }; grant codeBase file:${catalina.home}/webapps/training/- { permission java.net.SocketPermission mail.server.name:25, connect,resolve; }; /CATALINA_POLICY Am I missing something? Is there something that has majorly changed between Tomcat 4 and Tomcat 5? Please help. :) Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ Power, n: The only narcotic regulated by the SEC instead of the FDA. This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 and Mail...
On Tuesday 23 November 2004 16:55, Phillip Qin wrote: Okay, I have set the policies and I have built a basic mailer form, now when I try and send an e-mail I get this error: ERROR javax.mail.NoSuchProviderException: smtp at javax.mail.Session.getService(Session.java:611) at javax.mail.Session.getTransport(Session.java:541) at javax.mail.Session.getTransport(Session.java:484) at javax.mail.Session.getTransport(Session.java:464) at javax.mail.Session.getTransport(Session.java:519) at javax.mail.Transport.send0(Transport.java:155) at javax.mail.Transport.send(Transport.java:81) at org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:75) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) /ERROR Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ If anything can go wrong, it will. pgpYfIBB1i00J.pgp Description: PGP signature
Re: Tomcat 5 and Mail...
On Tuesday 23 November 2004 14:50, you wrote: Hi, Well, let's try an even simpler scenario: test it without a SecurityManager. I have now checked that I have all the correct parameter in both the server.xml and the web.xml file for ther server and each individual application respectively. Still no luck. :( What Tomcat 5 version? Apache Tomcat/5.0 1.4.2_05-b04 Sun Microsystems Inc. Linux 2.6.8-24.3-bigsmp i386 Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ How wonderful opera would be if there were no singers. pgpnM9ZKQylvh.pgp Description: PGP signature
Re: Tomcat 5 and Mail...
On Tuesday 23 November 2004 15:10, Shapira, Yoav wrote: Hi, Hi, Let's try again: which specific Tomcat 5 version, e.g. 5.0.28? ;) Sorry. 5.0.27-9 The reason I ask is that I broke the MailSession factory in 5.0.25, so if you're using that build AND a JNDI MailSession factory, that would explain your problem. Ahhh. :) Yoav Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ It's more than magnificent -- it's mediocre. -- Sam Goldwyn pgpTYUthLmKCG.pgp Description: PGP signature
RE: Tomcat 5 and Mail...
Hi, Sending mail works just fine for me (without a SecurityManager at the moment) on 5.0.28 both through a JNDI factory and a normal JavaMail tutorial-type usage. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Quinton Delpeche [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 8:16 AM To: [EMAIL PROTECTED] Subject: Re: Tomcat 5 and Mail... On Tuesday 23 November 2004 15:10, Shapira, Yoav wrote: Hi, Hi, Let's try again: which specific Tomcat 5 version, e.g. 5.0.28? ;) Sorry. 5.0.27-9 The reason I ask is that I broke the MailSession factory in 5.0.25, so if you're using that build AND a JNDI MailSession factory, that would explain your problem. Ahhh. :) Yoav Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ It's more than magnificent -- it's mediocre. -- Sam Goldwyn This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 and Mail...
In 4.1.30, I set these policies grant codeBase file:${catalina.home}/webapps/- { // email permission java.io.FilePermission ${catalina.home}/common/lib/activation.jar,read; permission java.io.FilePermission ${catalina.home}/common/lib/mail.jar,read; permission java.io.FilePermission ${java.home}/jre/lib/maicap,read; permission java.io.FilePermission ${java.home}/jre/lib/javamail.address.map,read; permission java.io.FilePermission ${java.home}/jre/lib/javamail.providers,read; permission java.net.SocketPermission mail.yourdomain.com:25,connect,resolve; }; -Original Message- From: Quinton Delpeche [mailto:[EMAIL PROTECTED] Sent: November 23, 2004 8:16 AM To: [EMAIL PROTECTED] Subject: Re: Tomcat 5 and Mail... On Tuesday 23 November 2004 15:10, Shapira, Yoav wrote: Hi, Hi, Let's try again: which specific Tomcat 5 version, e.g. 5.0.28? ;) Sorry. 5.0.27-9 The reason I ask is that I broke the MailSession factory in 5.0.25, so if you're using that build AND a JNDI MailSession factory, that would explain your problem. Ahhh. :) Yoav Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ It's more than magnificent -- it's mediocre. -- Sam Goldwyn