0 Replies Latest reply on Dec 23, 2008 9:54 AM by Vinay Kumar

    Cannot open database connection, as Tx not active

    Vinay Kumar Newbie

      I'm getting following exception when running multiple clients accessing my SLSB on JBoss 4.2.2.GA / Remoting 2.4.0.SP1 / PostgreSQL 8.3.

      Please suggest the required changes.

      <log4j:event logger="org.hibernate.util.JDBCExceptionReporter" timestamp="1230028593145" level="WARN" thread="WorkerThread#60[150.158.72.149:2547]">
      <log4j:message><![CDATA[SQL Error: 0, SQLState: null]]></log4j:message>
      </log4j:event>

      <log4j:event logger="org.hibernate.util.JDBCExceptionReporter" timestamp="1230028593145" level="ERROR" thread="WorkerThread#60[150.158.72.149:2547]">
      <log4j:message><![CDATA[Transaction is not active: tx=TransactionImple < ac, BasicAction: -6961b782:a8b:4950ae26:a388d status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -6961b782:a8b:4950ae26:a388d status: ActionStatus.ABORT_ONLY >)]]></log4j:message>
      </log4j:event>

      <log4j:event logger="com.barco.cms.logging.LogServer" timestamp="1230028593583" level="DEBUG" thread="Thread-12">
      <log4j:message><![CDATA[Connection received from /150.158.72.149]]></log4j:message>
      </log4j:event>

      <log4j:event logger="com.barco.cms.service.sourcemgt.SourcePoolImpl" timestamp="1230028593286" level="WARN" thread="WorkerThread#87[150.158.74.117:2607]">
      <log4j:message><![CDATA[Exception occured while retriving ScreenScrapeSources returns empty list ]]></log4j:message>
      <log4j:throwable><![CDATA[javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
      at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
      at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
      at com.barco.cms.service.sourcemgt.SourcePoolImpl.getScreenScrapeSources(Unknown Source)
      at com.barco.cms.service.perspectivemgt.Display.createProSource(Unknown Source)
      at com.barco.cms.service.perspectivemgt.Display.setOnline(Unknown Source)
      at com.barco.cms.openapi.PerspectiveMgtAPIImpl.setDisplayInfo(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      at com.barco.cms.openapi.PerspectiveMgtAPIImpl.initialSteps(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:146)
      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.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      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.dynamicInvoke(StatelessContainer.java:304)
      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
      Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
      at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
      at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
      at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
      at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
      at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
      at org.hibernate.loader.Loader.doQuery(Loader.java:673)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
      at org.hibernate.loader.Loader.doList(Loader.java:2220)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
      at org.hibernate.loader.Loader.list(Loader.java:2099)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
      ... 42 more
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -6961b782:a8b:4950ae26:a35f4 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -6961b782:a8b:4950ae26:a35f4 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)
      ... 56 more
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -6961b782:a8b:4950ae26:a35f4 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)
      ... 58 more
      ]]></log4j:throwable>
      </log4j:event>