Buscar
Social
Ofertas laborales ES

Foro sobre Java SE > JavaMail Problem

Hola, hemos pasado una aplicación web de Windows a Linux y nos está dando problemas el envío de correo. A ver si alguien nos puede ayudar. Arrancamos el tomcat y al prinicipio se envían correctamente los correos desde la web pero en algún momento empieza a dar este error:

javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1652)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:534)
at javax.mail.Service.connect(Service.java:291)
at com.monty.mail.MONTY_SendMail.sendMail(MONTY_SendMail.java:298)
at com.monty.mail.MONTY_SendMail.sendMail(MONTY_SendMail.java:414)
at com.monty.lucca.web.GestionIncidencias.sendMailToPagadora(GestionIncidencias.java:601)
at com.monty.lucca.web.GestionIncidencias.recomiendaEnvio(GestionIncidencias.java:370)
at com.monty.lucca.web.GestionIncidencias.recomiendaEnvio(GestionIncidencias.java:253)
at com.monty.lucca.web.GestionIncidencias.service(GestionIncidencias.java:143)
at com.bjs.j2ee.web.handler.B_RequestHandler.callService(B_RequestHandler.java:542)
at com.bjs.j2ee.web.handler.B_RequestHandler.service(B_RequestHandler.java:374)
at com.bjs.j2ee.web.handler.B_RequestHandler.service(B_RequestHandler.java:288)
at com.bjs.j2ee.web.handler.tag.ServiceTag.doStartTag(ServiceTag.java:141)
at org.apache.jsp.central.gestion.tabla_005fincidenciaEnvio_jsp._jspService(tabla_005fincidenciaEnvio_jsp.java:245)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at com.googlecode.psiprobe.Tomcat60AgentValve.invoke(Tomcat60AgentValve.java:30)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:701)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1715)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1678)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1661)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1242)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:503)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:443)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:1647)
... 36 more
Caused by: java.lang.RuntimeException: Could not generate DH keypair
at sun.security.ssl.ECDHCrypt.(ECDHCrypt.java:80)
at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:558)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:191)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:609)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:545)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:963)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
... 40 more

Caused by: java.security.InvalidAlgorithmParameterException: parameter object not a ECParameterSpec
at org.bouncycastle.jce.provider.JDKKeyPairGenerator$EC.initialize(Unknown Source)
at sun.security.ssl.ECDHCrypt.(ECDHCrypt.java:75)
... 47 more

marzo 11, 2014 | Registered Commenterfootmaniac84

¿Con qué versión de JavaSE se lanza esa excepción?

marzo 11, 2014 | Registered Commenterchoces