File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Exception while trying to send out email thru application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exception while trying to send out email thru application" Watch "Exception while trying to send out email thru application" New topic
Author

Exception while trying to send out email thru application

Pawankumar Gupta
Greenhorn

Joined: Jan 04, 2012
Posts: 1
Hello All,

I am getting the following exception from my application when it tries to send out email. The full exception is as follows :-

[Wed Jan 04 10:17:38 CST 2012] -- ERROR -- Turbine.handleException: null
[Wed Jan 04 10:17:38 CST 2012] -- ERROR --
Exception: java.lang.reflect.InvocationTargetException
Stack Trace follows:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityActionEvent.java:159)
at org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionEvent.java:107)
at org.apache.turbine.modules.actions.VelocityAction.perform(VelocityAction.java:110)
at org.apache.turbine.modules.actions.VelocitySecureAction.perform(VelocitySecureAction.java:100)
at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
at org.apache.turbine.modules.Page.build(Page.java:90)
at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
at org.apache.turbine.Turbine.doGet(Turbine.java:576)
at org.apache.turbine.Turbine.doPost(Turbine.java:671)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:376)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
at java.lang.Thread.run(Thread.java:536)
Caused by: javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: smtpmail.am.corp.airliquide.com, port: 25;
nested exception is:
java.net.ConnectException: Connection timed out
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at org.apache.turbine.util.mail.Email.send(Email.java:424)
at org.apache.turbine.util.mail.HtmlEmail.send(HtmlEmail.java:292)
at org.apache.turbine.util.velocity.VelocityHtmlEmail.send(VelocityHtmlEmail.java:198)
at com.airliquide.jace.util.ALRequestPull.sendVelocityEmail(ALRequestPull.java:665)
at com.airliquide.jace.modules.actions.SubmitNew.doSubmitace(SubmitNew.java:1120)
... 48 more


This issue is only happening in the Dev env and the production works just fine. I tried to TELNET SMTP server on port 25 and it connected. Please advise.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception while trying to send out email thru application
 
Similar Threads
running struts application on unix
Mails not being sent without SMTP authentication
executing mail example in webapps/examples of Tomcat
DynaActionForm - Exception creating bean
Mails not being sent without SMTP authentication