[jboss-user] [Datasource Configuration] - Oracle XA datasource with oci driver

raizcor raizcor do-not-reply at jboss.com
Tue Apr 5 22:43:59 EDT 2011


raizcor raizcor [http://community.jboss.org/people/raizcor] created the discussion

"Oracle XA datasource with oci driver"

To view the discussion, visit: http://community.jboss.org/message/598046#598046

--------------------------------------------------------------
Right now I'm using a XA datasource to an Oracle database in my application and it works very well, but I need to test it using the oci driver.

I've resolved some problems but now I'm getting the following exception:

.
.
.
20:57:53,520 INFO   http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver JNDI InitialContext properties:{}
20:57:54,017 WARN   http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener at 155a2e[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection at 1ad96b4 handles=0 lastUse=1302055072412 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$PoolBySubject at aead4b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool at 1f352c5 xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection at 1ad96b4 txSync=null]
oracle.jdbc.xa.OracleXAException
    at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:938)
    at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:244)
    at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:213)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:799)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:510)
    at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:908)
    at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:662)
    at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
    at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    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)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
    at org.hibernate.loader.Loader.list(Loader.java:2120)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
.
.
.
20:57:54,024 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver java.lang.IllegalMonitorStateException
20:57:54,024 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.unlock(BaseWrapperManagedConnection.java:277)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:235)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:799)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:510)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:908)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:662)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
20:57:54,025 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.doQuery(Loader.java:696)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
20:57:54,031 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.doList(Loader.java:2228)
20:57:54,032 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
20:57:54,032 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.list(Loader.java:2120)
20:57:54,032 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
20:57:54,032 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
20:57:54,032 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
.
.

20:57:54,129 WARN   http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver SQL Error: 0, SQLState: null
20:57:54,129 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY >))
20:57:54,135 WARN   http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver SQL Error: 0, SQLState: null
20:57:54,135 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver Transaction is not active: tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY >)
.
.
.
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.doQuery(Loader.java:696)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.doList(Loader.java:2228)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.Loader.list(Loader.java:2120)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
20:57:54,146 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
.
.
.
20:57:54,147 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY >)
20:57:54,147 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
20:57:54,147 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
20:57:54,147 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
20:57:54,147 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     ... 151 more
20:57:54,147 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a040d3d:96b5:4d9bc88b:6b status: ActionStatus.ABORT_ONLY > 
20:57:54,148 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)
20:57:54,148 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
20:57:54,148 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
20:57:54,148 ERROR  http://community.jboss.org/message/598046#598046 Oracle XA datasource with oci driver     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
.
.
.



What i've already done is add the *oracle_env.sh* script provided by the oracle installation which added the following environment variables:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib

That resolved a previous problem where a native library cannot be found in the 'java.library.path'.

Another thing I've done is configure a TNS service name in my tnsnames.ora file located in my home directory, which don't need before using the oci driver.

I'm working with:
Oracle 10g XE Release 10.2.0.1.0
JBoss AS 5.1.0.GA


Any help will be appreciated
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/598046#598046]

Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110405/82657dc8/attachment-0001.html 


More information about the jboss-user mailing list