-->
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.  [ 1 post ] 
Author Message
 Post subject: hibernate temp tables w/ OracleXADataSource(JTA) NOT WORKNG?
PostPosted: Tue Jun 12, 2007 7:31 am 
Newbie

Joined: Tue May 02, 2006 6:39 pm
Posts: 2
We have recently decided to move to JTA and OracleXADataSources with Oracle10g, hibernate 3.2.1 and Atomikos Transaction manager.

We managed to make all the necessary changes, but I am still bunging my head against the following problem. I understand hibernate uses global temporary tables to deal with bulk update/ bulk deletes in the case of inheritence.

Well, in my case I am trying to issue on simple update through:
String sql = "update " + childClass + " o " +
"set " +
"o.prop1 = :prop1 " +
"where o = :object";
.In the process of running this HQL query , hibernate fails to create that temp table.
In the AbstractStatementExecutor.createTemporaryTableIfNecessary(), the executeUpdate fails with the following error:

ORA-02089: COMMIT is not allowed in a subordinate session
The corresponding SQL for the temp table was:
create global temporary table HT_CHILDCLASS (ccID CHAR(32) not null) on commit delete rows

I read through the forum and found couple of interesting posting, this one (http://beehive.apache.org/docs/1.0.2/sy ... guide.html) was especially useful as I know understand the problem is due to the 'on commit delete rows' being issued while using and XADatasource and JTA. The articles suggests to suspend the transaction, run the statement and resume again the transaction.
I looked at the hibernate code again, and this is what you guys are doing in the Isolater.delegateWork() method.

Any thought/idea on to fix this problem. Could it be the JDBC driver?? I am using the ojdbc14.jar for oracle10g.
I have also tried with hibernate 3.2.4SP1, with no success.... Note that the same piece of code was working perfectly fine, prior to us moving to JTA. (I.e: the temp tables were created fine)


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

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.