-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Transaction Commit fails when using 2 Data sources
PostPosted: Sun Jun 27, 2004 7:03 pm 
Newbie

Joined: Thu Jun 24, 2004 6:09 pm
Posts: 9
Hi all,
I am getting following exception when I am trying to save a record. I am using 2 data sources in WSAD. One to connect to db2 using XA connector and second one to connect to Oracle (hibernate uses the second one).

My code flow is as follows:

1. Container managed bean calls an insert routine.
2. insert routine saves the record in DB2, using simple JDBC connection to DB2.
3. Same routine continues to save in oracle DB using hibernate.
4. At the end of this method global transaction should commit both the operations. But it is FAILING.
5. My configuration is correct.

Can some one throws me some pointer to fix this issue.

Thanks in advance

[6/27/04 18:55:54:672 EDT] 2fed6383 RegisteredRes E WTRN0063E: An illegal attempt to commit a one phase capable resource with existing two phase capable resources has occurred.
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: vmcid: 0x0 minor code: 0 completed: No
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:79)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled Code))
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled Code))
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at com.ibm.rmi.util.ProxyUtil.copyObject(ProxyUtil.java:320)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObject(UtilDelegateImpl.java:789)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at javax.rmi.CORBA.Util.copyObject(Util.java:332)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at com.cpships.nsd.booking.services._BookingServices_Stub.saveBooking(_BookingServices_Stub.java:264)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at com.cpships.nsd.booking.web.BookingBusinessDelegate.saveBooking(BookingBusinessDelegate.java:184)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at com.cpships.nsd.booking.web.BookingAction.execute(BookingAction.java:86)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
[6/27/04 18:55:54:906 EDT] 2fed6383 SystemErr R at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
[6/27/04 18:55:54:922 EDT] 2fed6383 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[6/27/04 18:55:54:922 EDT] 2fed6383 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[6/27/04 18:55:54:969 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
[6/27/04 18:55:54:984 EDT] 2fed6383 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 28, 2004 8:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Is the connection to the Oracle database XA-compliant driver also? If not it should be. Usually transaction managers can not handle XA and non-XA resources in the same transaction when its 2PC has been enabled.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.