Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

An illegal attempt to commit a one phase capable resource with existing two phase-WAS

 
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I listen to message in Message Driven bean. I use Datasource to insert record in DB2 from onMessage(..) by calling other DataAccess POJO classes using Datasource. I have done all configurations in WSAD test server and hitting DB2.

When I debug my code, I see that I can insert to DB2 and even can close connection without any Exception. However, the transaction gets rolled back with following exception message:

[11/11/05 17:21:32:265 EST] 639d639d WSRdbDataSour I DSRA8203I: Database product name : DB2
[11/11/05 17:21:32:281 EST] 639d639d WSRdbDataSour I DSRA8204I: Database product version : 07.01.0001
[11/11/05 17:21:32:281 EST] 639d639d WSRdbDataSour I DSRA8205I: JDBC driver name : IBM DB2 JDBC 2.0 Type 2
[11/11/05 17:21:32:281 EST] 639d639d WSRdbDataSour I DSRA8206I: JDBC driver version : 07.02.0000
[11/11/05 17:21:41:031 EST] 639d639d RegisteredRes E WTRN0063E: An illegal attempt to commit a one phase capable resource with existing two phase capable resources has occurred.
[11/11/05 17:21:41:218 EST] 639d639d ServerSession W WMSG0031E: Exception processing JMS Message for MDB ArchiveIngest, JMSDestination jms/SAM.TEST : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
com.ibm.ws.exception.WsEJBException
at java.lang.Throwable.<init>(Throwable.java)
at javax.ejb.EJBException.<init>(EJBException.java:26)
at com.ibm.ws.exception.WsEJBException.<init>(WsEJBException.java:105)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:159)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3128)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)
javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java:73)
at javax.ejb.EJBException.<init>(EJBException.java:50)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java:96)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:165)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3128)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:372)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)

What settings do I need in WSAD test server?
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem might be related to JTA.

If you have more than 1 resource, you can have at most, only 1 non-xa driver. For example, if you have 5 resources, at least 4 must be using xa drivers. In other words, you cannot have more than 1 non-xa driver in that situation.

In your case, your mdb uses 1 resource(your queue or topic), and the second is db2.

I think you are using 2 non-xa drivers.

This is a popular error met. You can search this forum and lots of cases.

Here is one.

All you need to do, since you have only 2 resources, is make one of them use xa.
 
reply
    Bookmark Topic Watch Topic
  • New Topic