6 Replies Latest reply on Nov 10, 2009 5:02 AM by Trelieux Einagen

    EntityManager is closed Exception for a resultList

    Trelieux Einagen Newbie

      Hello,


      My team is having a issue with entityManager closing after doing a entityQuery search with the following pojo like below: 




      @Name("exoshellUserRolesList")
      @Scope(ScopeType.SESSION)
      public class ExoshellUserRolesList extends EntityQuery<ExoshellUserRoles> {
           @In
           protected EntityManager entityManager;     
              
           private static final String[] RESTRICTIONS = {
                "lower(exoshellUserRoles.exoshellUsers.username) like concat(lower(#{exoshellUserRolesList.exoshellUserRoles.exoshellUsers.username}),'%')",
                "lower(exoshellUserRoles.exoshellRoles.roleName) like concat(lower(#{exoshellUserRolesList.exoshellUserRoles.exoshellRoles.roleName}),'%')",
                "lower(exoshellUserRoles.exoshellModules.moduleName) like concat(lower(#{exoshellUserRolesList.exoshellUserRoles.exoshellModules.moduleName}),'%')"
           };     
           
           private ExoshellUserRoles exoshellUserRoles = new ExoshellUserRoles(); 
           @In(create=true)
           private ExoshellUsersHome exoshellUsersHome;
           @In(create=true)
           private ExoshellRolesHome exoshellRolesHome;
           @In(create=true)
           private ExoshellModulesHome exoshellModulesHome;
           private String queryString = new String("select exoshellUserRoles from ExoshellUserRoles exoshellUserRoles");
      
           public ExoshellUserRolesList() {   
                      setEjbql(queryString);
           }
                
      
           @Override
           public List<ExoshellUserRoles> getResultList() {          
                return super.getResultList();
           }
           
           
           @Override
           public String getEjbql() {
                return queryString;
           }
      
           public ExoshellUserRoles getExoshellUserRoles() {
                 if (exoshellUserRoles.getExoshellUsers() == null){
                      exoshellUserRoles.setExoshellUsers(exoshellUsersHome.getInstance());
                 }  
                 if (exoshellUserRoles.getExoshellRoles() == null){
                      exoshellUserRoles.setExoshellRoles(exoshellRolesHome.getInstance());
                 }  
                 if (exoshellUserRoles.getExoshellModules() == null){
                      exoshellUserRoles.setExoshellModules(exoshellModulesHome.getInstance());
                 }  
                return exoshellUserRoles;
           }
      
           @Override
           public List<String> getRestrictions() {
                return Arrays.asList(RESTRICTIONS);
           }
      
           @Override
           public String getOrder() {
                return new String("exoshellUserRoles.userRolesId asc");
           }
      
      }






      After doing 2 consecutive searchs (1 search then leaving the page, returning to do another search) the following error stack is generated: 


      .....




      1:30:57,655 ERROR [ExceptionFilter] exception root cause
      javax.el.ELException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_388
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
           at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
           at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
           at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
           at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
           at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
           at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
           at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
           at org.ajax4jsf.context.AjaxContextImpl.renderAjaxRegion(AjaxContextImpl.java:286)
           at org.ajax4jsf.context.AjaxContextImpl$2.invoke(AjaxContextImpl.java:201)
           at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
           at org.ajax4jsf.context.AjaxContextImpl.invokeOnComponent(AjaxContextImpl.java:157)
           at org.ajax4jsf.context.AjaxContextImpl.renderSubmittedAjaxRegion(AjaxContextImpl.java:215)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:239)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           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:173)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           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:241)
           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:447)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalStateException: EntityManager is closed
           at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
           at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:455)
           at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:450)
           at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:120)
           at org.jboss.seam.transaction.AbstractUserTransaction.enlist(AbstractUserTransaction.java:73)
           at org.jboss.seam.framework.EntityQuery.joinTransaction(EntityQuery.java:230)
           at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:173)
           at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:73)
           at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:65)
           at com.domain.exoshellcms.session.ExoshellUserRolesList.getResultList(ExoshellUserRolesList.java:50)



      Tried injectiong the entityManger in the entityHome but to no effect, been googling and trying possible solutions like this one:

      http://seamframework.org/Community/WhyEntityManagerIsClosed


      but so far none of the solutions have helped.  Looking for guidance on how to resolve this situation or further documentation on possible solutions.


      Thank you

        • 1. Re: EntityManager is closed Exception for a resultList
          Trelieux Einagen Newbie

          Note the trace




          com.domain.exoshellcms.session.ExoshellUserRolesList.getResultList(ExoshellUserRolesList.java:50
          
          which is this line: 
          
               @Override
               public List<ExoshellUserRoles> getResultList() {          
                    return super.getResultList();
               }




          • 2. Re: EntityManager is closed Exception for a resultList
            Stuart Douglas Master

            Is that a full trace? Generally for this error there is an earlier error that has closed the entity manager (although if that exception is caught somewhere it may not be obvious where this is happening).

            • 3. Re: EntityManager is closed Exception for a resultList
              Trelieux Einagen Newbie

              Hello Stuart,


              This is the full stack trace.






              19:18:55,831 WARN  [lifecycle] javax.el.ELException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411
              19:18:56,428 ERROR [viewhandler] Error Rendering View[/admin/ExoshellUserRolesEdit.xhtml]
              javax.faces.FacesException: javax.el.ELException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411
                   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:393)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
                   at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                   at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
                   at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
                   at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
                   at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
                   at org.ajax4jsf.component.AjaxViewRoot$4.invokeRoot(AjaxViewRoot.java:384)
                   at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
                   at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
                   at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:401)
                   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
                   at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                   at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
                   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
                   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   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:173)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                   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:241)
                   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:447)
                   at java.lang.Thread.run(Thread.java:619)
              Caused by: javax.el.ELException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411
                   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
                   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
                   ... 70 more
              Caused by: java.lang.IllegalStateException: EntityManager is closed
                   at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
                   at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:455)
                   at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:450)
                   at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:120)
                   at org.jboss.seam.transaction.AbstractUserTransaction.enlist(AbstractUserTransaction.java:73)
                   at org.jboss.seam.framework.EntityQuery.joinTransaction(EntityQuery.java:230)
                   at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:173)
                   at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:73)
                   at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:65)
                   at com.domain.exoshellcms.session.ExoshellUserRolesList.getResultList(ExoshellUserRolesList.java:50)
                   at sun.reflect.GeneratedMethodAccessor5639.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   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.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
                   at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
                   at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
                   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 com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411.getResultList(ExoshellUserRolesList_$$_javassist_411.java)
                   at sun.reflect.GeneratedMethodAccessor5638.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   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.parser.AstEmpty.getValue(AstEmpty.java:29)
                   at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                   ... 71 more
              19:18:56,616 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,617 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,873 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,873 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,889 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,890 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,908 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,908 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,955 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,955 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,963 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,963 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,972 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,972 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:56,980 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
              19:18:56,980 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:d191:4af62507:1f1a status: ActionStatus.ABORT_ONLY >)
              19:18:57,320 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /admin/ExoshellUserRolesEdit.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@7d99eb6c]
              19:18:57,345 ERROR [ExceptionFilter] handling uncaught exception
              javax.servlet.ServletException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   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:173)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                   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:241)
                   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:447)
                   at java.lang.Thread.run(Thread.java:619)
              Caused by: javax.el.ELException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411
                   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
                   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
                   at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                   at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
                   at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
                   at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
                   at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
                   at org.ajax4jsf.context.AjaxContextImpl.renderAjaxRegion(AjaxContextImpl.java:286)
                   at org.ajax4jsf.context.AjaxContextImpl$2.invoke(AjaxContextImpl.java:201)
                   at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
                   at org.ajax4jsf.context.AjaxContextImpl.invokeOnComponent(AjaxContextImpl.java:157)
                   at org.ajax4jsf.context.AjaxContextImpl.renderSubmittedAjaxRegion(AjaxContextImpl.java:215)
                   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:239)
                   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
                   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                   ... 40 more
              Caused by: java.lang.IllegalStateException: EntityManager is closed
                   at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
                   at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:455)
                   at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:450)
                   at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:120)
                   at org.jboss.seam.transaction.AbstractUserTransaction.enlist(AbstractUserTransaction.java:73)
                   at org.jboss.seam.framework.EntityQuery.joinTransaction(EntityQuery.java:230)
                   at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:173)
                   at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:73)
                   at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:65)
                   at com.domain.exoshellcms.session.ExoshellUserRolesList.getResultList(ExoshellUserRolesList.java:50)
                   at sun.reflect.GeneratedMethodAccessor5639.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   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.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
                   at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
                   at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
                   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 com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411.getResultList(ExoshellUserRolesList_$$_javassist_411.java)
                   at sun.reflect.GeneratedMethodAccessor5638.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:597)
                   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.parser.AstEmpty.getValue(AstEmpty.java:29)
                   at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                   ... 69 more
              19:18:57,346 ERROR [ExceptionFilter] exception root cause
              javax.el.ELException: /admin/ExoshellUserRolesEdit.xhtml @364,70 rendered="#{empty exoshellUserRolesList.resultList}": Error reading 'resultList' on type com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411
                   at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
                   at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
                   at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                   at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
                   at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
                   at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                   at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:143)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:86)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:134)
                   at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:122)
                   at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:553)
                   at org.ajax4jsf.context.AjaxContextImpl.renderAjaxRegion(AjaxContextImpl.java:286)
                   at org.ajax4jsf.context.AjaxContextImpl$2.invoke(AjaxContextImpl.java:201)
                   at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
                   at org.ajax4jsf.context.AjaxContextImpl.invokeOnComponent(AjaxContextImpl.java:157)
                   at org.ajax4jsf.context.AjaxContextImpl.renderSubmittedAjaxRegion(AjaxContextImpl.java:215)
                   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:239)
                   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
                   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   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:173)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                   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:241)
                   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:447)
                   at java.lang.Thread.run(Thread.java:619)



              • 4. Re: EntityManager is closed Exception for a resultList
                Trelieux Einagen Newbie


                Caused by: java.lang.IllegalStateException: EntityManager is closed
                     at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:455)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:450)
                     at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:120)
                     at org.jboss.seam.transaction.AbstractUserTransaction.enlist(AbstractUserTransaction.java:73)
                     at org.jboss.seam.framework.EntityQuery.joinTransaction(EntityQuery.java:230)
                     at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:173)
                     at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:73)
                     at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:65)
                     at com.domain.exoshellcms.session.ExoshellUserRolesList.getResultList(ExoshellUserRolesList.java:50)
                     at sun.reflect.GeneratedMethodAccessor5639.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     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.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
                     at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
                     at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
                     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 com.domain.exoshellcms.session.ExoshellUserRolesList_$$_javassist_411.getResultList(ExoshellUserRolesList_$$_javassist_411.java)
                     at sun.reflect.GeneratedMethodAccessor5638.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:597)
                     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.parser.AstEmpty.getValue(AstEmpty.java:29)
                     at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                     ... 69 more
                19:18:57,602 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/a4j.taglib.xml
                19:18:57,606 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/ajax4jsf.taglib.xml
                19:18:57,611 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/rich.taglib.xml
                19:18:57,616 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/richfaces.taglib.xml
                19:18:57,620 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
                19:18:57,634 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
                19:18:57,643 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
                19:18:57,647 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
                19:18:57,650 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
                19:18:57,653 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
                19:18:57,656 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
                19:18:57,663 INFO  [compiler] Added Library from: jar:file:/home/nmatrix9/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/seam_cms.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml



                • 5. Re: EntityManager is closed Exception for a resultList
                  Stuart Douglas Master

                  Try adding this to your class:


                      @Override
                      public EntityManager getPersistenceContext()
                     {
                        return entityManager;
                     }
                  
                  



                  I think what the entity query is holding on to an old persistion context, as entity managers are conversation scoped while your query is session scoped. I don't use the seam application framework so I can't really tell you why this is happening.

                  • 6. Re: EntityManager is closed Exception for a resultList
                    Trelieux Einagen Newbie

                    Hello Stuart,


                    That solved the issue.


                    Thank you!