Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Originally posted by Kyle Brown:
From the DB2 Information Center (which ships with DB2) you can find the following information:
[b]SQL30090N Operation invalid for application execution environment. Reason code = "<reason-code>"
Explanation: The operation is invalid for the application execution environment. For example, an operation might be invalid for applications that have special restrictions on statements or APIs - applications such as those that operate in an XA Distributed Transaction Processing environment, such as CICS; those that operate with CONNECT type 2 connection settings; or those that use federated system functionality to update multiple heterogeneous data sources. The operation was rejected.
Possible reason codes are:
...
06 - The SET CLIENT API was issued in an XA/DTP environment.
My guess is that there's something wrong with the setup of the DataSource (and/or database driver) that you're using as the default datasource for this CMP bean.
For instance, have you set your DB2 driver as "JTA Enabled"? If so there are additional steps that you have to follow to allow your driver to successfully use JTA -- consult the WebSphere documentation for details.
BTW, most of the time you do NOT need to enable JTA -- that's only the case when you need 2-phase commit transactions crossing multiple databases or a database and MQ Series...
Kyle
[/B]
Originally posted by pdiaz:
Hi,
We are using WSAD4.03 test environment with WAS4.0 , JTA, DB2, operating system Windows 2000. We are trying to access to the database using:
javax.sql.XADataSource ds = (javax.sql.XADataSource)ctx.lookup("jdbc/myDSName")
and we get the following exception:: "java.lang.ClassCastException: com.ibm.ejs.cm.JDBC1PhaseRF"
In WSAD4.03 we have added a new driver with the class com.ibm.db2.jdbc.DB2XADatasource and we have defined a datasource with JTA option enabled. We have also checkec we use JDBC2.0.
Any help would be really apreciated
Thanks!
Paula
Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|