[jboss-user] [JBoss Seam] - Re: Configuring non-ssl connection to smtp server

jbekas do-not-reply at jboss.com
Thu Aug 2 13:45:37 EDT 2007


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 at 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.
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070227#4070227

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070227



More information about the jboss-user mailing list