Hi, I am getting following exception with WebSphere App Server Version 5.1.1.3
"An illegal attempt to commit a one phase capable resource with existing two phase capable resources has occurred."
Interestngly this is not happening with older version WepSphere Application server 5.1.0.4
suggestion are welcome
Thanks
Manish
Discussions
EJB programming & troubleshooting: one phase capable resource with existing two phase capable
-
one phase capable resource with existing two phase capable (6 messages)
- Posted by: Manish Kishore
- Posted on: March 21 2005 16:44 EST
Threaded Messages (6)
- one phase capable resource with existing two phase capable by Bill Lasley on March 21 2005 22:54 EST
- Re:one phase capable resource with existing..... by Manish Kishore on March 24 2005 12:37 EST
- XA exception by Jackson George on June 27 2006 16:21 EDT
- one phase capable resource with existing two phase capable by haeloong chan on April 05 2005 06:56 EDT
- WAS 5.0 by Archimedes Trajano on March 02 2006 19:34 EST
- An illegal attempt to use multiple resources that have only one- by Jia Jiunn Wong on March 23 2006 05:55 EST
- WAS 5.0 by Archimedes Trajano on March 02 2006 19:34 EST
-
one phase capable resource with existing two phase capable[ Go to top ]
- Posted by: Bill Lasley
- Posted on: March 21 2005 22:54 EST
- in response to Manish Kishore
WTRN0063E: An illegal attempt to commit a one phase capable resource with existing two phase capable resources has occurred.
Explanation: The transaction service has refused an attempt to commit a one phase capable resource with a transaction already involving other two phase capable resources. Either Last Participant Support (LPS) is not available, or if LPS is available, the application does not accept the heuristic risk that this would involve.
User Response: Ensure that one and two phase capable resources are not involved in the same transaction, or if LPS is available, reconfigure the application to accept the heuristic risk that this would involve.
I think LPS is only available in WBI-SF with WAS 5.1 (i.e. not available if you are using WAS 5.1 base or WAS 5.1 ND), so it looks like you will need to make a code change, if WAS support can not help you through it.
Not sure why your code worked in previous releases, but does not work now. A quick look at the 5.1.1.3 defect list (http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg27004936#1) does not show any fixes related to database commit issues. Support may be able help with that question, as well.
Bill Lasley
Versant Corp.
http://www.versant.com -
Re:one phase capable resource with existing.....[ Go to top ]
- Posted by: Manish Kishore
- Posted on: March 24 2005 12:37 EST
- in response to Bill Lasley
Thanks Bill for Reply.
Yes, I facing this problem in 5.1.1.3 and not in 5.1.0.4
IBM reports that this bug was fixed in 5.1.1.3.
I am not sure whether LPS is available in the server.
You told that we can 'reconfigure the application to accept the heuristic risk'.
How can i make changes in code to accept heuristic risk.
Thanks
Manish
[email protected] -
XA exception[ Go to top ]
- Posted by: Jackson George
- Posted on: June 27 2006 16:21 EDT
- in response to Bill Lasley
Note that any time you do multiple getConnection() calls using a resource reference that specifies res-sharing-scope=Unshareable , then you get multiple physical connections. This situation also occurs when res-sharing-scope=Shareable, but the sharing rules are broken. In either case, if you run in a global transaction, ensure the resources involved are enabled for two-phase commit (also sometimes referred to as JTA Enabled). Failure to do so results in an XA exception that logs the following message: www.itprototype.com -
one phase capable resource with existing two phase capable[ Go to top ]
- Posted by: haeloong chan
- Posted on: April 05 2005 06:56 EDT
- in response to Manish Kishore
hello all, i think i faced the same problem as you; i am using websphere 5.0.0, installed using default setting. may be there is a need for extra addon-installation. can you kindly guide me, i am new to websphere. thanks.
i am trying to do a multiple Data Sources lookup and stored in a Map (eg. databases db2004, db2003, db2002, etc.). by default, my program will get connection at db2004, then search the record. if record found, return a ResultSet, else it will loop to the next Data Source in the Map until the end.
i got the following Exceptions:
E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
E J2CA0030E: Method enlist caught java.lang.IllegalStateException
...
while trying to enlist resources from datasource jdbc/IIMS2004 with the Transaction Manager for the current transaction, and threw a Exception.
this exception occurred at this line
preparedStatement = con.prepareStatement(lStrQuery);
i checked i added the relevant EJB Resource References it, as well as in the Data Source entry in the server, i am using Websphere Developer Edition 5.0.0.
thanks
regards, hlchan. -
WAS 5.0[ Go to top ]
- Posted by: Archimedes Trajano
- Posted on: March 02 2006 19:34 EST
- in response to haeloong chan
Have you been able to get it working in WAS 5.0? -
An illegal attempt to use multiple resources that have only one-[ Go to top ]
- Posted by: Jia Jiunn Wong
- Posted on: March 23 2006 17:55 EST
- in response to Archimedes Trajano
I am facing the same problem too.
I tried switch jdbc driver class to oracle.jdbc.xa.client.OracleXADataSource.
it works for my application for a while but it gives server side error.
recoveryClasspath = D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/rsadapter.rar
. The error code was XAER_RMERR. The exception stack trace follows: javax.transaction.xa.XAException
at java.lang.Throwable.<init>(Throwable.java)
at javax.transaction.xa.XAException.<init>(XAException.java:63)
at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:508)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover(WSRdbXaResourceImpl.java:672)
at com.ibm.ws.Transaction.JTA.XARminst.recover(XARminst.java:130)
at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:673)
at com.ibm.ws.Transaction.JTA.RecoveryManager.resync(RecoveryManager.java:1415)
at com.ibm.ws.Transaction.JTA.ResyncThread.run(RecoveryManager.java:1448)
Does anyone know the exact way to solve it?
Thanks in Advance!
JJ