4 Replies Latest reply on Aug 11, 2009 5:22 PM by Sean Ballow

    Seam Interceptor and EntityManager. How do I get the both to play nice with each other?

    Sean Ballow Newbie

      We are having a problem using an Interceptor and EntityManager to persist an @Entity.


      We are able to reference the entityManager using Component.getInstance(entityManager) and the object we get back is not null, and isOpen() returns true yet we get an Unknown Entity stack when trying to persist.


      Thanks for any help you can give. We really would like to persist data to the database from an Interceptor using the Seam managed entityManager if possible. Any solutions or workarounds gladly accepted





      @Interceptor(around = {
              BijectionInterceptor.class,
              MethodContextInterceptor.class,
              ConversationInterceptor.class,
              SynchronizationInterceptor.class,
              ConversationalInterceptor.class,
              RemoveInterceptor.class,
              SeamInterceptor.class,
              SecurityInterceptor.class,
              TransactionInterceptor.class,
              EventInterceptor.class,
              HibernateSessionProxyInterceptor.class,
              ManagedEntityIdentityInterceptor.class
              })
      public class AuthenticationInterceptor {

          @AroundInvoke
          public Object authenticationLogging(InvocationContext invocation) throws Exception {
              try {
             
                  return invocation.proceed();
                 
              } finally {
             
                  record();
                 
              }
          }
         
         
          private void record() {       

              EntityManager em = (EntityManager)Component.getInstance("entityManager");
            
              try {
             
                  em.persist(new Audit());
                  em.flush();
                 
              } catch (Exception e) {
             
                  e.printStackTrace();
                 
              }
          }

      }








      @Retention(RetentionPolicy.RUNTIME)
      @Interceptors(AuthenticationInterceptor.class)
      public @interface AuthLogger {}







      @Name("authenticator")
      @Scope(ScopeType.SESSION)
      @AuthLogger
      public class Authenticator {
      .....
      }





      [Entity]
      
      @Entity
      @Table(name="t_audit")
      public class Audit {
      
          private Long id;
      
          @Id
          @SequenceGenerator(name = "SEQ_GEN", sequenceName = "s_audit")
          @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_GEN")
          public Long getId() {
              return id;
          }
      
          public void setId(Long id) {
              this.id = id;
          }
      }







      11:13:25,785 ERROR [STDERR] java.lang.IllegalArgumentException: Unknown entity: x.xxxx.xxxx.entity.Audit
      11:13:25,785 ERROR [STDERR]      at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:215)
      11:13:25,785 ERROR [STDERR]      at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:135)
      11:13:25,785 ERROR [STDERR]      at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.persist(FullTextEntityManagerImpl.java:82)
      11:13:25,785 ERROR [STDERR]      at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:135)
      11:13:25,785 ERROR [STDERR]      at x.xxx.xxx.intercept.AuthenticationInterceptor.record(AuthenticationInterceptor.java:110)
      11:13:25,785 ERROR [STDERR]      at x.xxx.xxx.intercept.AuthenticationInterceptor.authenticationLogging(AuthenticationInterceptor.java:86)
      11:13:25,785 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:13:25,785 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      11:13:25,785 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:13:25,785 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:177)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:72)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      11:13:25,786 ERROR [STDERR]      at x.xxx.xxx.auth.Authenticator_$$_javassist_17.authenticate(Authenticator_$$_javassist_17.java)
      11:13:25,786 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:13:25,786 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      11:13:25,786 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:13:25,786 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      11:13:25,786 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
      11:13:25,786 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
      11:13:25,786 ERROR [STDERR]      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      11:13:25,786 ERROR [STDERR]      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      11:13:25,786 ERROR [STDERR]      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
      11:13:25,786 ERROR [STDERR]      at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:108)
      11:13:25,786 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:13:25,787 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      11:13:25,787 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:13:25,787 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      11:13:25,787 ERROR [STDERR]      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
      11:13:25,787 ERROR [STDERR]      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
      11:13:25,787 ERROR [STDERR]      at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
      11:13:25,787 ERROR [STDERR]      at java.security.AccessController.doPrivileged(Native Method)
      11:13:25,787 ERROR [STDERR]      at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
      11:13:25,787 ERROR [STDERR]      at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
      11:13:25,787 ERROR [STDERR]      at org.jboss.seam.security.Identity.authenticate(Identity.java:254)
      11:13:25,787 ERROR [STDERR]      at org.jboss.seam.security.Identity.authenticate(Identity.java:243)
      11:13:25,787 ERROR [STDERR]      at org.jboss.seam.security.Identity.login(Identity.java:200)
      11:13:25,787 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:13:25,787 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      11:13:25,787 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:13:25,787 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
      11:13:25,787 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
      11:13:25,787 ERROR [STDERR]      at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
      11:13:25,787 ERROR [STDERR]      at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      11:13:25,787 ERROR [STDERR]      at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      11:13:25,787 ERROR [STDERR]      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      11:13:25,787 ERROR [STDERR]      at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      11:13:25,787 ERROR [STDERR]      at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      11:13:25,787 ERROR [STDERR]      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      11:13:25,787 ERROR [STDERR]      at javax.faces.component.UICommand.broadcast(UICommand.java:383)
      11:13:25,787 ERROR [STDERR]      at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
      11:13:25,788 ERROR [STDERR]      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      11:13:25,788 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      11:13:25,788 ERROR [STDERR]      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      11:13:25,788 ERROR [STDERR]      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      11:13:25,788 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      11:13:25,788 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
      11:13:25,788 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      11:13:25,788 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      11:13:25,788 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      11:13:25,788 ERROR [STDERR]      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      11:13:25,789 ERROR [STDERR]      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      11:13:25,789 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:13:25,789 ERROR [STDERR]      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      11:13:25,789 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      11:13:25,789 ERROR [STDERR]      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:13:25,789 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      11:13:25,789 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      11:13:25,789 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      11:13:25,789 ERROR [STDERR]      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      11:13:25,789 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      11:13:25,789 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      11:13:25,789 ERROR [STDERR]      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      11:13:25,789 ERROR [STDERR]      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      11:13:25,789 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:613)




      Again, thanks for any help on this. Without this working I'm having to look at auditing alternatives like enverse or hibernate events (both very viable) but our preference would be to persist data via the interceptor.


      Regards,
      Sean



        • 1. Re: Seam Interceptor and EntityManager. How do I get the both to play nice with each other?
          Sean Ballow Newbie

          Found the solution.


          Problem: dependency or jar conflict in the jboss lib directory. Blew away the copy of jboss we were using and replaced it with a newly downloaded 4.2.3.GA and the problem went away.


          The following works great for referencing the entityManager from an @Interceptor



          EntityManager entityManager = (EntityManager)Component.getInstance("entityManager");



          • 2. Re: Seam Interceptor and EntityManager. How do I get the both to play nice with each other?
            he sheng Newbie

            hi: I use your way to persis the object in interceptor phase, but the console exception like below:


            my code is like:



            @Interceptor(stateless = true)
            @Name("AuthenticatorInterceptor")
            public class TimeInterceptor {
            
                 private MetaLog ml;
            
                 private static final long serialVersionUID = 1L;
            
                 @AroundInvoke
                 public Object aroundInvoke(InvocationContext invocation) throws Exception {
                           final String methodName = invocation.getMethod().getName();
                           final String className = invocation.getTarget().getClass()
                                     .getName();
                           Object result = null;
                           Method method = invocation.getMethod();
                           if (method.isAnnotationPresent(IsInterceptor.class)) {
                                System.err.println("CALLING: " + className + "::" + methodName);
                                final long start = System.currentTimeMillis();
                                result = invocation.proceed();
                                final long end = System.currentTimeMillis();
                                final double time = (end - start) / 1000.0;
                                System.err.println("CALL took: " + time);
                                IsInterceptor ii = method.getAnnotation(IsInterceptor.class);
                                String operatorName = ii.operatorName();
                                if (Constant.isExist(operatorName)) {
                                     System.out.println("xxx 做了" + operatorName);
                                }
                                MTongIdentity identity = JSFUtil.getCurrentIdentity();
                                // get request parameter
                                StringBuffer requestParameter = new StringBuffer();
                                HttpServletRequest request = JSFUtil.getRequest();
                                Enumeration en = request.getParameterNames();
                                while (en.hasMoreElements()) {
                                     System.out.println((String) en.nextElement() + ":"
                                               + request.getParameter((String) en.nextElement()));
                                     requestParameter.append((String) en.nextElement() + ":"
                                               + request.getParameter((String) en.nextElement()));
                                }
                                ml = new MetaLog();
                                ml.setAccNumYear(new Integer(identity.getAccYear()).toString());
                                ml.setStartDate(new Long(start).toString());
                                ml.setEndDate(new Long(end).toString());
                                ml.setEntCode(identity.getEntcode());
                                ml.setInput(requestParameter.toString());
                                ml.setLogCreateTime(new Date().toString());
                                ml.setMobile(identity.getMobile());
                                ml.setOperateName(operatorName);
                                ml.setPageView(false);
                                ml.setRequestFrom(getRequestFrom());
                                ml.setReturnBack(getRequestFrom());
                                ml.setSuccess(true);
                                ml.setWap(true);
                                ml.setSourceIP(getIP());
                                ml.setSms(false);
                                ml.setOutput("");
                                log(ml);
                                return result;
                           }
                           System.out.println(methodName + "is interceptor");
                           result = invocation.proceed();
                           return result;
                 }
            
                 private void log(MetaLog ml) {
                      EntityManager em = (EntityManager) Component
                                .getInstance("entityManager");
                      try {
                           em.persist(ml);
                           em.flush();
                      } catch (Exception e) {
                           e.printStackTrace();
                      }
                 }






            javax.el.ELException: java.util.NoSuchElementException: Hashtable Enumerator
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                 at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                 at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                 at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                 at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
                 at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at javax.security.auth.login.LoginContext.invoke(Unknown Source)
                 at javax.security.auth.login.LoginContext.access$000(Unknown Source)
                 at javax.security.auth.login.LoginContext$5.run(Unknown Source)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at javax.security.auth.login.LoginContext.invokeCreatorPriv(Unknown Source)
                 at javax.security.auth.login.LoginContext.login(Unknown Source)
                 at org.jboss.seam.security.Identity.authenticate(Identity.java:259)
                 at org.jboss.seam.security.Identity.authenticate(Identity.java:248)
                 at org.jboss.seam.security.Identity.login(Identity.java:205)
                 at cn.mtong.session.common.MTongIdentity.login(MTongIdentity.java:60)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                 at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
                 at cn.mtong.session.common.MTongIdentity_$$_javassist_2.login(MTongIdentity_$$_javassist_2.java)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                 at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                 at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                 at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                 at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                 at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
                 at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
                 at javax.faces.component.UICommand.broadcast(UICommand.java:387)
                 at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
                 at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
                 at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
                 at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                 at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                 at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                 at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                 at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 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:230)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                 at java.lang.Thread.run(Unknown Source)
            Caused by: java.util.NoSuchElementException: Hashtable Enumerator
                 at java.util.Hashtable$Enumerator.nextElement(Unknown Source)
                 at cn.mtong.session.commom.interceptor.TimeInterceptor.aroundInvoke(TimeInterceptor.java:77)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:177)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:72)
                 at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
                 at cn.mtong.session.wap.AuthenticatorForWAP_$$_javassist_3.authenticate(AuthenticatorForWAP_$$_javassist_3.java)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                 ... 96 more
            15:56:36,772 ERROR [STDERR] CALLING: cn.mtong.session.wap.AuthenticatorForWAP::authenticate
            15:56:36,788 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
            15:56:36,788 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: a012e16:4c9:4a6967c6:41 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a012e16:4c9:4a6967c6:41 status: ActionStatus.ABORT_ONLY >)
            15:56:36,803 ERROR [SeamLoginModule] Error invoking login method
            javax.el.ELException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                 at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                 at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                 at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                 at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
                 at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at javax.security.auth.login.LoginContext.invoke(Unknown Source)
                 at javax.security.auth.login.LoginContext.access$000(Unknown Source)
                 at javax.security.auth.login.LoginContext$5.run(Unknown Source)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at javax.security.auth.login.LoginContext.invokeCreatorPriv(Unknown Source)
                 at javax.security.auth.login.LoginContext.login(Unknown Source)
                 at org.jboss.seam.security.Identity.authenticate(Identity.java:259)
                 at org.jboss.seam.security.Identity.authenticate(Identity.java:248)
                 at org.jboss.seam.security.Identity.quietLogin(Identity.java:237)
                 at org.jboss.seam.security.Identity.isLoggedIn(Identity.java:145)
                 at org.jboss.seam.security.Identity.isLoggedIn(Identity.java:135)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                 at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
                 at cn.mtong.session.common.MTongIdentity_$$_javassist_2.isLoggedIn(MTongIdentity_$$_javassist_2.java)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
                 at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
                 at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
                 at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
                 at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
                 at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                 at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:111)
                 at org.jboss.seam.navigation.Rule.matches(Rule.java:30)
                 at org.jboss.seam.navigation.Navigation.navigate(Navigation.java:56)
                 at org.jboss.seam.navigation.Pages.navigate(Pages.java:134)
                 at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:42)
                 at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
                 at javax.faces.component.UICommand.broadcast(UICommand.java:387)
                 at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
                 at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
                 at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
                 at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                 at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                 at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                 at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                 at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                 at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                 at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                 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:230)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                 at java.lang.Thread.run(Unknown Source)
            Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
                 at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
                 at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
                 at cn.mtong.session.wap.AuthenticatorForWAP.authenticate(AuthenticatorForWAP.java:108)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                 at cn.mtong.session.commom.interceptor.TimeInterceptor.aroundInvoke(TimeInterceptor.java:60)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                 at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:177)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:72)
                 at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
                 at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
                 at cn.mtong.session.wap.AuthenticatorForWAP_$$_javassist_3.authenticate(AuthenticatorForWAP_$$_javassist_3.java)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                 ... 101 more
            Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
                 at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
                 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
                 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
                 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
                 at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
                 at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
                 at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
                 at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
                 at org.hibernate.loader.Loader.doQuery(Loader.java:673)
                 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
                 at org.hibernate.loader.Loader.doList(Loader.java:2220)
                 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
                 at org.hibernate.loader.Loader.list(Loader.java:2099)
                 at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
                 at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
                 at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
                 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
                 at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
                 at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
                 ... 132 more
            Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a012e16:4c9:4a6967c6:41 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a012e16:4c9:4a6967c6:41 status: ActionStatus.ABORT_ONLY >)
                 at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
                 at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
                 at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
                 ... 146 more
            Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a012e16:4c9:4a6967c6:41 status: ActionStatus.ABORT_ONLY >
                 at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:319)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
                 at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
                 at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
                 ... 148 more



            any suggestion?


            best regards!
            peacherdiy@126.com

            • 3. Re: Seam Interceptor and EntityManager. How do I get the both to play nice with each other?
              he sheng Newbie

              is that meaning that the interceptor phase, the transaction is out of managered by the seam container?  if so , how Can I solve it?

              • 4. Re: Seam Interceptor and EntityManager. How do I get the both to play nice with each other?
                Sean Ballow Newbie

                I don't see anything wrong with your Interceptor persay but the exception appears to be occurring around line 74 according to the stacktrace. I think in here some where....




                while (en.hasMoreElements()) {
                                         System.out.println((String) en.nextElement() + ":"
                                                   + request.getParameter((String) en.nextElement()));
                                         requestParameter.append((String) en.nextElement() + ":"
                                                   + request.getParameter((String) en.nextElement()));
                                    }
                



                try commenting that out and seeing where it takes you. This doesn't look like a managed persistence issue IMHO.


                Sean