1 Reply Latest reply on May 29, 2013 9:28 AM by Marek Novotny

    Seam 2.3 Cannot Send Mail

    Sinan Doğan Newbie

      Hi. I cannot send mail with 2.3. I could do it with before version clearly with same code. I added mail and avtivation jars to jboss-deployement xml. What is problem? Thanks.

       

      Exception

      0:08:10,795 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http-localhost-127.0.0.1-8080-1) #{userFacade.webAdd()}: javax.faces.FacesException: No provider for smtps: javax.faces.FacesException: #{userFacade.webAdd()}: javax.faces.FacesException: No provider for smtps
                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
                at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
                at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
                at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
                at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]
                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]
                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]
                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.0.Final]
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]
                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_25]
      Caused by: javax.faces.el.EvaluationException: javax.faces.FacesException: No provider for smtps
                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]
                ... 38 more
      Caused by: javax.faces.FacesException: No provider for smtps
                at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:173) [jboss-seam-mail.jar:2.3.0.Final]
                at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181) [jboss-seam-ui.jar:2.3.0.Final]
                at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163) [jboss-seam-ui.jar:2.3.0.Final]
                at org.jboss.seam.ui.facelet.RendererRequest.renderFacelet(RendererRequest.java:138) [jboss-seam-ui.jar:2.3.0.Final]
                at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:106) [jboss-seam-ui.jar:2.3.0.Final]
                at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43) [jboss-seam-ui.jar:2.3.0.Final]
                at org.domain.carsclass.session.UserFacade.webAdd(UserFacade.java:139) [carsClass-ejb.jar:]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_25]
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_25]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_25]
                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_25]
                at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:35) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:186) [jboss-seam.jar:2.3.0.Final]
                at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:104) [jboss-seam.jar:2.3.0.Final]
                at org.domain.carsclass.session.UserFacade_$$_javassist_seam_2.webAdd(UserFacade_$$_javassist_seam_2.java) [carsClass-ejb.jar:]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_25]
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_25]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_25]
                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_25]
                at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) [jboss-el.jar:1.0_02.CR6]
                at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280) [jboss-el.jar:1.0_02.CR6]
                at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) [jboss-el.jar:1.0_02.CR6]
                at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65) [jboss-el.jar:1.0_02.CR6]
                at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) [jboss-el.jar:1.0_02.CR6]
                at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jboss-el.jar:1.0_02.CR6]
                at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
                ... 39 more
      Caused by: javax.mail.NoSuchProviderException: No provider for smtps
                at javax.mail.Session.getProvider(Session.java:464) [mail-1.4.4.jar:1.4.4]
                at javax.mail.Session.getTransport(Session.java:659) [mail-1.4.4.jar:1.4.4]
                at javax.mail.Session.getTransport(Session.java:640) [mail-1.4.4.jar:1.4.4]
                at javax.mail.Session.getTransport(Session.java:626) [mail-1.4.4.jar:1.4.4]
                at org.jboss.seam.mail.ui.UIMessage.encodeEnd(UIMessage.java:166) [jboss-seam-mail.jar:2.3.0.Final]
                ... 76 more
      
      

       

      html

       

       

      
      <m:message xmlns="http://www.w3.org/1999/xhtml"
      
      
          xmlns:m="http://jboss.org/schema/seam/mail"
      
      
          xmlns:h="http://java.sun.com/jsf/html">
      
      
      
      
      
          <m:from name="Class Bilgisayar" address="address" />
      
      
          <m:to name="#{userFacade.webUser.name} #{userFacade.webUser.surname}">#{userFacade.webUser.eMail}</m:to>
      
      
          <m:subject>Uyelik Onay</m:subject>    
      
      
          <m:body>
      
      
      
              <h:outputText value="Uyeligi tamamalamak icin onay kodunu girin:" />
                                    <h3>#{userFacade.eEmailConfirmRandom}</h3>
      
      
      
      
          </m:body>
      
      
      
      
      
      </m:message>
      
      

       

      component.xml

      <mail:mail-session host="smtp.gmail.com" port="465" password="password" username="username"  ssl="true"/>