[jboss-user] [JBoss Seam] - Extending EntityQuery and using ScopeType.SESSION question

fernando_jmt do-not-reply at jboss.com
Sun Apr 1 18:02:15 EDT 2007


Hi.

I have extended EntityQuery and defining that component as SESSION scope. Then I defined a page action which will call the super.refresh() in order to clear the result data and execute the query every time the view is accessed (only one time because I'm using @Factory). But, the query is executed as expected the first time I enter the page, but then (when trying to show another page using the paginator) I always get exceptions saying "EntityManager is closed".

If I change the scope type to STATELESS, then it seems to work fine.

Is there some restriction regarding what scope to use with components extending EntityQuery object? or what am I doing wrong?

Any help will be appreciated.

Thanks in advance.

My source code is below:
Component class:

  | 
  | @Name("userListing")
  | @Scope(ScopeType.SESSION)
  | public class UserList extends EntityQuery {
  | 
  | 
  |     @DataModel
  |     private List<User> usersResult;
  | 
  |     private UIData data;
  | 
  |      @Override
  |     public String getEjbql() {
  |         return "select u from User u";
  |     }
  | 
  |     @Override
  |     public String getOrder() {
  |         return "u.username desc";
  |     }
  | 
  |     @Override
  |     public Integer getMaxResults() {
  |         return 5;
  |     }
  |   
  |    public void reload() {
  |         super.refresh();
  |         usersResult = null;
  |     }
  | 
  |     @Factory(value = "usersResult")
  |     public void initialize() {
  |         int first = 1;
  |         if (data != null)
  |             first = data.getFirst();
  |         setFirstResult(first);
  |         usersResult = new PageList(getResultList(), getResultCount().intValue(), getMaxResults().intValue(), getFirstResult());
  | 
  | //PageList is an extension to List which intends to be used by datatable and paginator.
  |     }
  | 
  |   
  | 
  |     public UIData getData() {
  |         return data;
  |     }
  | 
  |     public void setData(UIData data) {
  |         this.data = data;
  |     }
  | }
  | 
  | 
  | 

pages.xml:

  | 
  | <page view-id="/user/list.xhtml" action="#{userListing.reload}"/>
  | 
  | 

/user/list.xhtml:

  | <rich:dataTable value="#{usersResult}" var="userItem" id="userListId"
  |                                 binding="#{userListing.data}"
  |                                 rows="#{userListing.maxResults}">
  | ...//columns... and the Paginator.
  | 
  | </rich:dataTable>
  | 

The exception stacktrace:


  | GRAVE: Error Rendering View[/user/list.xhtml]
  | java.lang.IllegalStateException: EntityManager is closed
  |         at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:41)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:407)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:402)
  |         at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:113)
  |         at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:104)
  |         at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:41)
  |         at com.jtp.app.action.UserList.initialize(UserList.java:60)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  |         at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:32)
  |         at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
  |         at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  |         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
  |         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
  |         at com.jtp.app.action.UserList_$$_javassist_4.initialize(UserList_$$_javassist_4.java)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
  |         at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
  |         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1696)
  |         at org.jboss.seam.Component.getInstance(Component.java:1633)
  |         at org.jboss.seam.Component.getInstance(Component.java:1610)
  |         at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
  |         at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
  |         at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73)
  |         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
  |         at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  |         at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
  |         at javax.faces.component.UIData.getValue(UIData.java:1023)
  |         at org.ajax4jsf.ajax.repeat.UIRepeat.getDataModel(UIRepeat.java:85)
  |         at org.ajax4jsf.ajax.repeat.UIRepeat.createDataModel(UIRepeat.java:79)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:464)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowIndex(UIDataAdaptor.java:227)
  |         at org.richfaces.component.UIDatascroller.BinarySearch(UIDatascroller.java:376)
  |         at org.richfaces.component.UIDatascroller.getRowCount(UIDatascroller.java:367)
  |         at org.richfaces.component.UIDatascroller.getPageCount(UIDatascroller.java:345)
  |         at org.richfaces.renderkit.html.DataScrollerRenderer.renderPager(DataScrollerRenderer.java:92)
  |         at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:306)
  |         at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:172)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
  |         at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  |         at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:252)
  |         at org.richfaces.renderkit.AbstractRowsRenderer.encodeTableHeaderFacet(AbstractRowsRenderer.java:274)
  |         at org.richfaces.renderkit.AbstractTableRenderer.encodeFooter(AbstractTableRenderer.java:130)
  |         at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:69)
  |         at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:166)
  |         at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:128)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
  |         at javax.faces.component.UIData.encodeBegin(UIData.java:551)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:926)
  |         at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  |         at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChild(AjaxChildrenRenderer.java:127)
  |         at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChild(AjaxChildrenRenderer.java:118)
  |         at org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:125)
  |         at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:536)
  |         at org.ajax4jsf.framework.ajax.AjaxViewRoot$4.invokeRoot(AjaxViewRoot.java:367)
  |         at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176)
  |         at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:382)
  |         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
  |         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
  |         at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
  |         at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
  |         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:66
  | 4)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  |         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  |         at java.lang.Thread.run(Thread.java:595)
  | initialize called......
  | initialize called......
  | initialize called......
  | 17:33:45,234 ERROR [ExceptionFilter] uncaught exception
  | javax.servlet.ServletException: EntityManager is closed
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:66
  | 4)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  |         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  |         at java.lang.Thread.run(Thread.java:595)
  | 17:33:45,234 ERROR [ExceptionFilter] exception root cause
  | java.lang.IllegalStateException: EntityManager is closed
  |         at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:41)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:407)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:402)
  |         at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:113)
  |         at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:104)
  |         at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:41)
  |         at com.jtp.app.action.UserList.initialize(UserList.java:60)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  |         at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:32)
  |         at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
  |         at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  |         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
  |         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
  |         at com.jtp.app.action.UserList_$$_javassist_4.initialize(UserList_$$_javassist_4.java)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
  |         at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
  |         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1696)
  |         at org.jboss.seam.Component.getInstance(Component.java:1633)
  |         at org.jboss.seam.Component.getInstance(Component.java:1610)
  |         at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
  |         at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
  |         at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73)
  |         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
  |         at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  |         at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
  |         at javax.faces.component.UIData.getValue(UIData.java:1023)
  |         at org.ajax4jsf.ajax.repeat.UIRepeat.getDataModel(UIRepeat.java:85)
  |         at org.ajax4jsf.ajax.repeat.UIRepeat.createDataModel(UIRepeat.java:79)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:464)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowIndex(UIDataAdaptor.java:227)
  |         at org.richfaces.component.UIDatascroller.BinarySearch(UIDatascroller.java:376)
  |         at org.richfaces.component.UIDatascroller.getRowCount(UIDatascroller.java:367)
  |         at org.richfaces.component.UIDatascroller.getPageCount(UIDatascroller.java:345)
  |         at org.richfaces.renderkit.html.DataScrollerRenderer.renderPager(DataScrollerRenderer.java:92)
  |         at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:306)
  |         at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:172)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
  |         at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  |         at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:252)
  |         at org.richfaces.renderkit.AbstractRowsRenderer.encodeTableHeaderFacet(AbstractRowsRenderer.java:274)
  |         at org.richfaces.renderkit.AbstractTableRenderer.encodeFooter(AbstractTableRenderer.java:130)
  |         at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:69)
  |         at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:166)
  |         at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:128)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
  |         at javax.faces.component.UIData.encodeBegin(UIData.java:551)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:926)
  |         at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  |         at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChild(AjaxChildrenRenderer.java:127)
  |         at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChild(AjaxChildrenRenderer.java:118)
  |         at org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:125)
  |         at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:536)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.renderAjaxRegion(AjaxContext.java:289)
  |         at org.ajax4jsf.framework.ajax.AjaxContext$2.invoke(AjaxContext.java:207)
  |         at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnComponent(AjaxContext.java:165)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.renderSubmittedAjaxRegion(AjaxContext.java:219)
  |         at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:252)
  |         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:66
  | 4)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  |         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  |         at java.lang.Thread.run(Thread.java:595)
  | 17:33:45,265 ERROR [DebugPageHandler] redirecting to debug page
  | java.lang.IllegalStateException: EntityManager is closed
  |         at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:41)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:407)
  |         at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:402)
  |         at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:113)
  |         at org.jboss.seam.framework.EntityQuery.createQuery(EntityQuery.java:104)
  |         at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:41)
  |         at com.jtp.app.action.UserList.initialize(UserList.java:60)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  |         at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:32)
  |         at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
  |         at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
  |         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  |         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  |         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
  |         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
  |         at com.jtp.app.action.UserList_$$_javassist_4.initialize(UserList_$$_javassist_4.java)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
  |         at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
  |         at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
  |         at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1696)
  |         at org.jboss.seam.Component.getInstance(Component.java:1633)
  |         at org.jboss.seam.Component.getInstance(Component.java:1610)
  |         at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
  |         at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
  |         at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73)
  |         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
  |         at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  |         at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
  |         at javax.faces.component.UIData.getValue(UIData.java:1023)
  |         at org.ajax4jsf.ajax.repeat.UIRepeat.getDataModel(UIRepeat.java:85)
  |         at org.ajax4jsf.ajax.repeat.UIRepeat.createDataModel(UIRepeat.java:79)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:464)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.setRowIndex(UIDataAdaptor.java:227)
  |         at org.richfaces.component.UIDatascroller.BinarySearch(UIDatascroller.java:376)
  |         at org.richfaces.component.UIDatascroller.getRowCount(UIDatascroller.java:367)
  |         at org.richfaces.component.UIDatascroller.getPageCount(UIDatascroller.java:345)
  |         at org.richfaces.renderkit.html.DataScrollerRenderer.renderPager(DataScrollerRenderer.java:92)
  |         at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:306)
  |         at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:172)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
  |         at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  |         at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:252)
  |         at org.richfaces.renderkit.AbstractRowsRenderer.encodeTableHeaderFacet(AbstractRowsRenderer.java:274)
  |         at org.richfaces.renderkit.AbstractTableRenderer.encodeFooter(AbstractTableRenderer.java:130)
  |         at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:69)
  |         at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:166)
  |         at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:128)
  |         at org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:101)
  |         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:515)
  |         at javax.faces.component.UIData.encodeBegin(UIData.java:551)
  |         at org.ajax4jsf.ajax.repeat.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:926)
  |         at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
  |         at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChild(AjaxChildrenRenderer.java:127)
  |         at org.ajax4jsf.framework.renderer.AjaxChildrenRenderer.encodeAjaxChild(AjaxChildrenRenderer.java:118)
  |         at org.ajax4jsf.framework.renderer.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:125)
  |         at org.ajax4jsf.framework.ajax.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:536)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.renderAjaxRegion(AjaxContext.java:289)
  |         at org.ajax4jsf.framework.ajax.AjaxContext$2.invoke(AjaxContext.java:207)
  |         at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:78)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnComponent(AjaxContext.java:165)
  |         at org.ajax4jsf.framework.ajax.AjaxContext.renderSubmittedAjaxRegion(AjaxContext.java:219)
  |         at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:252)
  |         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
  |         at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  |         at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  |         at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  |         at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:66
  | 4)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  |         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  |         at java.lang.Thread.run(Thread.java:595)
  | 

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

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



More information about the jboss-user mailing list