2 Replies Latest reply on May 19, 2010 7:33 AM by shane lee

    Error: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@6acfc9

    Dmitri Zakharov Newbie

      Hello everybody,


      I am new to Seam. I am working my way through the sample project prototype generated using 'seam generate' based on existing DB2/AS400 database. I'm using the following versions on Windows XP Pro:


      Seam : 2.1.1.GA
      JBoss: 5.0.1.GA
      Java : Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
      



      The CRUD project is generated fine. And before I customize anything I explode it to JBoss and run it. One of the things generated by 'seam generate'  is the ClaimList.xhtml page with displays the Search Filters section and list of existing claims. When I select ClaimList menu option this page is displayed fine (I see claims table with some records).


      Now if I type in the value in one of Search Filter boxes and click Search button I get a huge exception stack (the complete one is at the end of this message). The first cause that I see in the stack trace it as follows:


      Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@6acfc9
           at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81)
           at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:237)
           at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
           at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
           at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
           at org.hibernate.loader.Loader.doQuery(Loader.java:696)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
           at org.hibernate.loader.Loader.doList(Loader.java:2228)
           ... 98 more
      



      I did not touch anything yet in this CRUD project generated by 'seam generate'. And it is frustrating that it does not work right out of the box.


      Does anybody encountered the same error? Is there any cusomization that can be done to avoid it? Does it have something to do with other packages, Hibernate may be? The version of Hibernate that is used by default in this configuration is:


      Created-By: 1.4.2_11-b06 (Sun Microsystems Inc.)
      Implementation-Title: Hibernate3
      Implementation-Version: 3.2.4.sp1
      Implementation-Vendor: hibernate.org
      Hibernate-Version: 3.2.4.sp1



      And the version of com.ibm.as400.access.AS400JDBCDriver driver I am using is:


      Created-By: 1.4.2 (IBM Corporation)
      
      Name: com/ibm/as400/access/
      Specification-Title: IBM Toolbox for Java
      Specification-Version: 6.1.0.6
      Specification-Vendor: IBM Corporation
      Implementation-Title: com.ibm.as400.access
      Implementation-Version: JTOpen 6.4
      Implementation-Vendor: IBM Corporation and others
      



      Please, help. Any leads and suggestion are really appreciated.


      Thank you.


      Here's the full stack trace:


      javax.faces.FacesException: javax.el.ELException: /ClaimList.xhtml @87,58 rendered="#{empty claimList.resultList}": Error reading 'resultList' on type com.fedextnc.credits.action.ClaimList_$$_javassist_1
           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:220)
           at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
           at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
           at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
           at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
           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:196)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
           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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           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:177)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           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.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           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:235)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
           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: /ClaimList.xhtml @87,58 rendered="#{empty claimList.resultList}": Error reading 'resultList' on type com.fedextnc.credits.action.ClaimList_$$_javassist_1
           at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
           at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
           ... 58 more
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
           at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
           at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:74)
           at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:65)
           at sun.reflect.GeneratedMethodAccessor385.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:22)
           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:28)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:95)
           at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
           at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:89)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
           at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
           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:185)
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
           at com.fedextnc.credits.action.ClaimList_$$_javassist_1.getResultList(ClaimList_$$_javassist_1.java)
           at sun.reflect.GeneratedMethodAccessor384.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:54)
           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)
           ... 59 more
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
           at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
           at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
           at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
           at org.hibernate.loader.Loader.doList(Loader.java:2231)
           at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
           at org.hibernate.loader.Loader.list(Loader.java:2120)
           at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
           at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
           at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
           ... 90 more
      Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@6acfc9
           at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81)
           at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:237)
           at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
           at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
           at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
           at org.hibernate.loader.Loader.doQuery(Loader.java:696)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
           at org.hibernate.loader.Loader.doList(Loader.java:2228)
           ... 98 more