users@glassfish.java.net

Wrong XAState: 0

From: <glassfish_at_javadesktop.org>
Date: Tue, 17 Feb 2009 12:22:18 PST

Hi,

i get continuously the error: "java.lang.illegalStateException: Wrong XAState: 0"
Here the full history:

[#|2009-02-17T08:13:27.625+0100|SEVERE|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 16;_RequestID=b2c29646-8a11-420a-b5b5-cc9be2327e28;|RAR5029:Unexpected exception while registering component.
java.lang.IllegalStateException: Wrong XAState: 0
    at com.sun.jts.jta.TransactionState.startAssociation(TransactionState.java:323)
    at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:205)
    at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:562)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:372)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:169)
    at com.sun.enterprise.resource.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:144)
    at com.sun.enterprise.resource.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:102)
    at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:216)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
    at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
    at com.gf.costo.engine.db.DbManager.getConnection(DbManager.java:83)
    at com.gf.costo.engine.db.DbManager.GetDepotId(DbManager.java:3685)
    at com.gf.costo.engine.db.DbManager.GetAssetsOfDepot(DbManager.java:1241)
    at com.gf.costo.engine.db.DbManager.GetActiveAssets(DbManager.java:1201)
    at com.gf.costo.engine.calcengine.CalcEngine.RecalculateSingleIntradayDepot(CalcEngine.java:435)
    at com.gf.costo.engine.calcengine.CalcEngine.CalculateAllDepots(CalcEngine.java:235)
    at com.gf.costo.engine.scheduler.Scheduler.handleIntradayStockEvent(Scheduler.java:137)
    at com.gf.costo.engine.scheduler.Scheduler.runSchedulerTask(Scheduler.java:110)
    at com.gf.costo.engine.BackendManagerBean.handleTimeout(BackendManagerBean.java:92)
    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:597)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
    at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:2824)
    at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1401)
    at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:99)
    at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1952)
    at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.service(EJBTimerService.java:1948)
    at com.sun.ejb.containers.util.WorkAdapter.doWork(WorkAdapter.java:75)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)

There is a timer which initiates read and write actions to the database (postgres SQL with JDBC4 driver) and after some initiations I get this error and timer is got killed. My database pool has 200 connections, this should be definitely enougth for this task... I am using Glassfish V2, JDK 6 and postgres 8.2. Any ideas what's going wrong here?

Thanks,
Glassfox
[Message sent by forum member 'glassfox' (glassfox)]

http://forums.java.net/jive/thread.jspa?messageID=332479