on 01-16-2008 11:14 PM
Hi,
I am seeing the following exception. Please let me know how to fix this.
thanks
Sunita
com.sap.engine.services.connector.exceptions.BaseResourceException: The resource "xxx" does not support two-phase commit and cannot be enlisted in the current transaction, because another non supporting two-phase commit resource is already enlisted for component "webContainer/applications/JavaEE/YY-TPRO/YYr-TPRO" in application "JavaEE/YY-TPRO". Only one of the enlisted resources is allowed to be non two-phase commit compliant.
I am using JDBC 1.x datasource, and the .xml looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE data-sources SYSTEM 'data-sources.dtd'>
<data-sources>
<application-name>JavaEE/yy-TPRO</application-name>
<data-source>
<data-source-name>xxx</data-source-name>
<alias>jdbc/xxyyDB/TPRO</alias>
<driver-name>OracleThin</driver-name>
<init-connections>1</init-connections>
<max-connections>20</max-connections>
<max-time-to-wait-connection>60</max-time-to-wait-connection>
<sql-engine>vendor_sql</sql-engine>
<jdbc-1.x>
<driver-class-name>oracle.jdbc.driver.OracleDriver</driver-class-name>
<url>jdbc:oracle:thin:@sol-mercury:1521:hermes</url>
<user-name>abcd</user-name>
<password>abcd</password>
</jdbc-1.x>
</data-source>
</data-sources>
Tried making datasource Shareable, but still see the same error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From my code there is a call to
dataSource.getConnection() which returns the connection.
But, when there is a user transaction, after utx.begin, there is a call to
dataSource.getConnection()
thats when I see the exception mentioned in the first thread. Seems like the datasource is configured properly.
I went through all the other threads specified in this one.
Any guidance will be helpful.
thanks
Surekha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Thanks for the response, I already went through these threads.
My exception seems to be related to this - Problem with connection sharing if J2EE transaction is running
and suggested solutions seems to be:
The problem is caused when there is an inappropriate attempt to open a second connection in an active JTA transaction. There is either an attempt to get a second connection from an un-shareable non-XA DataSource or an attempt to get it from another non-XA DataSource. You have to:
● Use no more than one connection from this data source while the JTA transaction is active or
● Declare the data source as shareable, depending on your application logic.
Question is, How can I make data source as shareable??
This application worked fine in JBoss, weblogic and now we are trying to port it to NetWeaver.
Is any of the above options are configurable in data-sources.xml?
Thanks for your guidance and response.
Surekha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.