2 Replies Latest reply on Mar 20, 2014 10:22 AM by kushal aswani

    Exception invoking: getSession while using jboss.seam.mail.MailSession

    kushal aswani Newbie

      Hello,

       

      I am trying to send mail using gmail.smtp server and I am getting this exception any help would be much appreciated. Thanks!

       

      16:33:21,624 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13) [16:33:21,623] [http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13] ERROR (RTPost-sendEmail:423) -> Error sending mail
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13) java.lang.RuntimeException: exception invoking: getSession
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.unwrap(Component.java:2275)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.getInstance(Component.java:2041)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.getInstance(Component.java:2000)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.getInstance(Component.java:1994)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.getInstance(Component.java:1967)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.Component.getInstance(Component.java:1962)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.mail.MailSession.instance(MailSession.java:316)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.mail.ui.UIMessage.getMailSession(UIMessage.java:71)
      16:33:21,625 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.mail.ui.UIMessage.getMimeMessage(UIMessage.java:101)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.mail.ui.MailComponent.findMimeMessage(MailComponent.java:99)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.mail.ui.UIFrom.encodeBegin(UIFrom.java:23)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:172)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:192)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.facelet.RendererRequest.renderFacelet(RendererRequest.java:136)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:103)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at kaptest.services.vo.RTPost.sendEmail(RTPost.java:421)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at kaptest.services.vo.RTPost.getStudentProfile(RTPost.java:166)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at kaptest.services.vo.RTPost.doRtPost(RTPost.java:131)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at java.lang.reflect.Method.invoke(Method.java:606)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
      16:33:21,626 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.resteasy.ResteasyContextInjectionInterceptor.aroundInvoke(ResteasyContextInjectionInterceptor.java:59)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at kaptest.services.vo.RTPost_$$_javassist_seam_125.doRtPost(RTPost_$$_javassist_seam_125.java)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at java.lang.reflect.Method.invoke(Method.java:606)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
      16:33:21,627 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:536)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:513)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.resteasy.ResteasyResourceAdapter$1.process(ResteasyResourceAdapter.java:145)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.resteasy.ResteasyResourceAdapter.getResource(ResteasyResourceAdapter.java:120)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
      16:33:21,628 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      16:33:21,629 INFO  [stdout] (http-wwwawsinst01.qa01.kaptest.net/172.19.5.145:8080-13)   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)