9 Replies Latest reply on Feb 17, 2008 1:22 PM by Pete Muir

    Configuring non-ssl connection to smtp server

    Luke Swindale Newbie

      Hi,

      I've just tried testing sending an email in my seam app (based on the mail example... in release 1.2.0-P1). It appears to be finding the smtp server, but then fails the SSL handshake (see error below). The server is within our internal network and shouldn't require SSL, so I was wondering how I would configure it to not use SSL. Any ideas?

      Cheers

      2007-03-08 08:28:38,886 ERROR [MailUtil] Error sending mail
      javax.faces.FacesException: Can't send command to SMTP host
       at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:134)
       at org.jboss.seam.ui.JSF.renderChild(JSF.java:179)
       at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
       at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:108)
       at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:56)
       at com.transtoll.baseui.util.MailUtil.send(MailUtil.java:52)
       at com.transtoll.baseui.util.MailUtil$$FastClassByCGLIB$$5f583514.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:154)
       at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:89)
       at com.transtoll.baseui.util.MailUtil$$EnhancerByCGLIB$$82b333ca.send(<generated>)
       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:585)
       at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at com.transtoll.baseui.util.filter.ConcurrentFilter.doFilter(ConcurrentFilter.java:64)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:676)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.mail.MessagingException: Can't send command to SMTP host;
       nested exception is:
       javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
       at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)
       at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)
       at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:847)
       at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:384)
       at javax.mail.Service.connect(Service.java:275)
       at javax.mail.Service.connect(Service.java:156)
       at javax.mail.Service.connect(Service.java:105)
       at javax.mail.Transport.send0(Transport.java:168)
       at javax.mail.Transport.send(Transport.java:98)
       at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:130)
       ... 65 more
      Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
       at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
       at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
       at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
       at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
       at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
       at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
       at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:619)
       at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
       at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:101)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
       at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1418)
       ... 74 more
      Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
       at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:187)
       at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:139)
       at sun.security.validator.Validator.validate(Validator.java:203)
       at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
       at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
       at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:840)
       ... 85 more
      Caused by: java.security.cert.CertPathValidatorException: timestamp check failed
       at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:139)
       at sun.security.provider.certpath.PKIXCertPathValidator.doValidate(PKIXCertPathValidator.java:316)
       at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:178)
       at java.security.cert.CertPathValidator.validate(CertPathValidator.java:206)
       at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:182)
       ... 90 more
      Caused by: java.security.cert.CertificateExpiredException: NotAfter: Sat Sep 25 23:10:21 EST 2004
       at sun.security.x509.CertificateValidity.valid(CertificateValidity.java:256)
       at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:570)
       at sun.security.provider.certpath.BasicChecker.verifyTimestamp(BasicChecker.java:157)
       at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:109)
       at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:117)
       ... 94 more
      2007-03-08 09:51:23,953 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
      2007-03-08 09:51:39,047 INFO [LoadLPNJavascriptCommand] execute(HttpServletRequest) - end, LPN : loadLPN( {number:'',vehicleClass:'2'} );


        • 1. Re: Configuring non-ssl connection to smtp server
          Pete Muir Master

          Please turn on debug output on the mail session and post it here

          • 2. Re: Configuring non-ssl connection to smtp server
            John Bekas Newbie

            Ok, I'm having the same problem.
            Jboss 4.0.5.GA
            Seam 1.2.1

            From components.xml:

            <mail:mail-session host="mail.mymailserver.com" port="25" username="user@mymailserver.com" password="password" debug="true" />


            Debug output:
            12:34:41,935 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
            12:34:42,417 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
            12:34:42,437 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
            12:34:42,445 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
            12:34:42,457 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
            12:34:42,466 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
            12:34:42,477 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/seam-ui.taglib.xml
            12:34:42,494 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
            12:34:42,498 ERROR [STDERR] Aug 2, 2007 12:34:42 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
            12:34:42,581 INFO [MailSession] Creating JavaMail Session (mail.mymailserver.com:25)
            12:34:42,586 INFO [STDOUT] DEBUG: setDebug: JavaMail version 1.4ea
            12:34:42,586 INFO [MailSession] connected to mail server
            12:34:42,591 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
            12:34:42,592 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
            12:34:42,592 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
            12:34:42,592 INFO [STDOUT] DEBUG SMTP: trying to connect to host "mail.mymailserver.com", port 25, isSSL false
            12:34:45,871 INFO [STDOUT] 220 randymail-a3.g.dreamhost.com ESMTP
            12:34:45,871 INFO [STDOUT] DEBUG SMTP: connected to host "mail.mymailserver.com", port: 25
            12:34:45,872 INFO [STDOUT] EHLO monkey
            12:34:46,001 INFO [STDOUT] 250-randymail-a3.g.dreamhost.com
            250-PIPELINING
            250-SIZE 40960000
            250-ETRN
            250-STARTTLS
            250-AUTH LOGIN PLAIN
            250-AUTH=LOGIN PLAIN
            250 8BITMIME
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg ""
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "SIZE", arg "40960000"
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "ETRN", arg ""
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "STARTTLS", arg ""
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "AUTH=LOGIN", arg "PLAIN"
            12:34:46,002 INFO [STDOUT] DEBUG SMTP: Found extension "8BITMIME", arg ""
            12:34:46,003 INFO [STDOUT] STARTTLS
            12:34:46,561 INFO [STDOUT] 220 Ready to start TLS
            12:34:46,562 INFO [STDOUT] EHLO monkey
            12:34:46,670 ERROR [MailExample] Error sending mail
            javax.faces.FacesException: Can't send command to SMTP host
             at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:142)
             at org.jboss.seam.ui.JSF.renderChild(JSF.java:180)
             at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
             at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:150)
             at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:112)
             at org.jboss.seam.example.mail.MailExample.send(MailExample.java:42)
             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:585)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
             at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
             at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
             at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
             at org.jboss.seam.example.mail.MailExample_$$_javassist_89.send(MailExample_$$_javassist_89.java)
             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:585)
             at com.sun.el.parser.AstValue.invoke(AstValue.java:174)
             at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
             at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
             at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
             at javax.faces.component.UICommand.broadcast(UICommand.java:106)
             at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
             at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
             at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
             at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:595)
            Caused by: javax.mail.MessagingException: Can't send command to SMTP host;
             nested exception is:
             javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
             at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)
             at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)
             at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:847)
             at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:384)
             at javax.mail.Service.connect(Service.java:297)
             at javax.mail.Service.connect(Service.java:156)
             at javax.mail.Service.connect(Service.java:105)
             at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:136)
             ... 70 more
            Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
             at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1518)
             at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
             at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
             at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:848)
             at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
             at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
             at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:818)
             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
             at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:622)
             at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
             at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:101)
             at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
             at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
             at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1418)
             ... 77 more
            Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
             at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
             at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
             at sun.security.validator.Validator.validate(Validator.java:203)
             at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
             at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
             at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
             ... 88 more
            Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
             at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
             at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
             at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
             ... 93 more
            12:34:46,919 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
            12:34:46,922 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
            12:34:46,926 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
            12:34:46,929 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
            12:34:46,933 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
            12:34:46,940 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/seam-ui.taglib.xml
            12:34:46,946 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
            12:34:46,951 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: jar:file:/home/john/opt/jboss-4.0.5.GA/server/default/./tmp/deploy/tmp62453jboss-seam-email.ear-contents/jboss-seam-email-exp.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
            12:34:46,965 ERROR [STDERR] Aug 2, 2007 12:34:46 PM com.sun.facelets.impl.DefaultFacelet refresh
            INFO: Facelet[/index.xhtml] was modified @ 12:34:46 PM, flushing component applied @ 12:29:08 PM
            12:34:46,989 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
            12:34:46,989 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
            12:34:46,989 INFO [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
            
            


            • 3. Re: Configuring non-ssl connection to smtp server
              Pete Muir Master

              Please add a feature request to JIRA asking for a way to disable TLS.

              • 4. Re: Configuring non-ssl connection to smtp server
                John Bekas Newbie

                JIRA ticket created. Linked here for anyone else interested in a solution.

                http://jira.jboss.com/jira/browse/JBSEAM-1795

                • 5. Re: Configuring non-ssl connection to smtp server
                  Przemyslaw Rudzki Newbie

                  I am using Seam 2.0.1GA and it looks like this might be broken. I have configured mail session like this:

                  <mail:mail-session host="localhost" port="25"
                  username="someuser" password="somepass" ssl="false" />

                  and I get the exception:

                  javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

                  SMTP server accepts both TLS and nonTLS connections.

                  Any other way I can verify what is wrong?

                  Some debug logging might help:

                  4:10:29,260 INFO [MailSession] Creating JavaMail Session (localhost:25)
                  14:10:29,264 INFO [STDOUT] DEBUG: setDebug: JavaMail version 1.4ea
                  14:10:29,264 INFO [MailSession] connected to mail server
                  14:10:29,269 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
                  14:10:29,269 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
                  14:10:29,269 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
                  14:10:29,269 INFO [STDOUT] DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
                  14:10:29,285 INFO [STDOUT] 220 erace ESMTP Postfix (Ubuntu)
                  14:10:29,285 INFO [STDOUT] DEBUG SMTP: connected to host "localhost", port: 25

                  • 6. Re: Configuring non-ssl connection to smtp server
                    Przemyslaw Rudzki Newbie

                    Disabling TLS in SMTP server made exception go away.

                    • 7. Re: Configuring non-ssl connection to smtp server
                      Pete Muir Master

                      Please read the docs

                      <mail:mail-session host="localhost" port="25"
                      username="someuser" password="somepass" tls="false" />


                      • 8. Re: Configuring non-ssl connection to smtp server
                        Przemyslaw Rudzki Newbie

                        Heh my fault.

                        I have relied on JBoss Developer Studio content assist for editing components.xml which suggests attribute ssl rather than tls.

                        Thx. For help.

                        • 9. Re: Configuring non-ssl connection to smtp server
                          Pete Muir Master

                          There is also a ssl option ;)