• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to send mail via tomcat

 
som halikhede
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a web application which we recently hosted on rented dedicated server. The application sends out email on few events. We did not had any problem sending mail from our in-house server. However on rented server, we are facing problems.

We used the same classes and tried a simple command line java program on rented server and it works fine. However when we try to use same classes and send mail within tomcat we get following exception -

javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.MailSenderAction_jsp._jspService(MailSenderAction_jsp.java:62)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError
javax.crypto.Cipher.getInstance(DashoA12275)
com.sun.net.ssl.internal.ssl.JsseJce.getCipher(JsseJce.java:90)
com.sun.net.ssl.internal.ssl.RSACipher.<init>(RSACipher.java:35)
com.sun.net.ssl.internal.ssl.RSACipher.getInstance(RSACipher.java:69)
com.sun.net.ssl.internal.ssl.PreMasterSecret.<init>(PreMasterSecret.java:82)
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:514)
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:160)
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:619)
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:110)
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1715)
com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1704)
com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:1088)
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:468)
javax.mail.Service.connect(Service.java:288)
javax.mail.Service.connect(Service.java:169)
com.bredge.mail.MailSender.sendMail(MailSender.java:116)
org.apache.jsp.MailSenderAction_jsp._jspService(MailSenderAction_jsp.java:50)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Other related information -

We are Java 1.5 and Tomcat 5.0.28
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the webapp is missing the crypto libs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!