users@glassfish.java.net

App Server 8.2 + Local transaction already has 1 non-XA Resource: + Sybase

From: <glassfish_at_javadesktop.org>
Date: Mon, 12 Jan 2009 14:19:42 PST

Hi All,
I'm pretty much at wits end as I ask this, so any help is greatly appreciated. I currently have an application running in the Sun App Server 8.2. It has a custom workflow module that uses EJBs (QueueConnectionFactory and TopicConnectionFactory had been setup originally which I haven't modified). So far, this application really used one data source until the new module I've come to add, where in it now has a second data source set up (which references a different database server). The thing is that, when a call is made to load some data which includes obtaining a connection to the new data source, i get an error in the logs :

java.lang.IllegalStateException: Local transaction already has 1 non-XA Resource: cannot add more resources.
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:98)
        at com.sun.enterprise.resource.SystemResourceManagerImpl.enlistResource(SystemResourceManagerImpl.java:69)
        at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:258)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:147)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:122)
        at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:70).........


This only seems to happen when the call is made from the workflow module (the call is made to the same delegate/DAO that the rest of the application uses). I don't really have much of an idea about EJBs and their workings (including JMS) and wanted to know if there was something simple I was missing in any configuration that would need to be made to make this work correctly.

I'm connecting to a Sybase database for both resources set up and use JConnect 6 (jconn3) as the driver.
Using Sun App Server 8.2


Thanks for any input.
[Message sent by forum member 'aquatum' (aquatum)]

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