2 Replies Latest reply on Nov 26, 2009 11:18 AM by German Escobar

    GenericJDBCException in EntityManager

    sumit kumar Newbie
      Hi All,

      I am getting this exception while running this code.


      Please help.


      ****************Code**********************
      log.info("START---getBrief()----");
      briefInstance=briefHome.getEntityManager().find(Brief.class, new Long(briefId));
      log.info("END---getBrief()----");


      *****************Log**********************


      14:32:08,791 WARN  [renderkit] Unable to find component with ID packingQuantity in view.
      14:32:08,853 WARN  [renderkit] Unable to find component with ID packingQuantity in view.
      14:32:09,259 WARN  [renderkit] Unable to find component with ID invoiceMethod in view.
      14:32:09,494 INFO  [BriefInvoiceFacadeImpl] START---getBrief()----
      14:32:09,509 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      14:32:09,509 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: a0d4133:b1c:4b0cea68:158 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is n
      ot active: tx=TransactionImple < ac, BasicAction: a0d4133:b1c:4b0cea68:158 status: ActionStatus.ABORT_ONLY >)
      14:32:09,509 INFO  [DefaultLoadEventListener] Error performing load command
      org.hibernate.exception.GenericJDBCException: Cannot open connection
              at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
              at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
              at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
              at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
              at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
              at org.hibernate.loader.Loader.doQuery(Loader.java:673)
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
              at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
              at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3044)
              at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
              at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
              at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
              at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
              at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
              at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
              at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
              at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:174)
              at org.jboss.seam.persistence.EntityManagerProxy.find(EntityManagerProxy.java:87)
              at uk.co.tntpost.umbrella.order.session.facade.impl.BriefInvoiceFacadeImpl.getBrief(BriefInvoiceFacadeImpl.java:179)
              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.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
              at com.jamonapi.aop.JAMonEJBInterceptor.intercept(JAMonEJBInterceptor.java:26)
              at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
              at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
              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.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
              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.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:29)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:31)
              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.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
              at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
              at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)
              at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)
              at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)
              at $Proxy258.getBrief(Unknown Source)
              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:22)
              at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
              at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
              at org.javassist.tmp.java.lang.Object_$$_javassist_203.getBrief(Object_$$_javassist_203.java)
              at uk.co.tntpost.umbrella.order.backing.BriefInvoiceBacking.getSelectedBriefId(BriefInvoiceBacking.java:910)
              at uk.co.tntpost.umbrella.order.backing.BriefInvoiceBacking.getInvoiceList(BriefInvoiceBacking.java:917)
              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: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.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
              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:166)
              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
              at uk.co.tntpost.umbrella.order.backing.BriefInvoiceBacking_$$_javassist_196.getInvoiceList(BriefInvoiceBacking_$$_javassist_196.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 javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
              at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
              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.parser.AstNot.getValue(AstNot.java:26)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:271)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:285)
              at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:280)
              at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              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:120)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
              at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
              at org.jboss.seam.ui.renderkit.ValidateAllRendererBase.doEncodeChildren(ValidateAllRendererBase.java:33)
              at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
              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:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
              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.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
              at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a0d4133:b1c:4b0cea68:158 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction i
      s not active: tx=TransactionImple < ac, BasicAction: a0d4133:b1c:4b0cea68:158 status: ActionStatus.ABORT_ONLY >)
              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
              at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
              at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
              ... 191 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a0d4133:b1c:4b0cea68:158 status: ActionStatus.ABORT_ONLY >
              at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
              ... 193 more
      14:32:09,588 ERROR [viewhandler] Error Rendering View[/Brief.xhtml]
      javax.faces.FacesException: javax.el.ELException: /Brief.xhtml @678,86 rendered="#{not empty briefInvoiceBacking.invoiceList}": Error reading 'invoiceList' on type uk.co.tntpost.umbrella.order.backing.BriefInvoiceBacking_$$_javassist_196
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:271)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
              at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)