Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NO commit() in code, but getting "Operation Connection.commit is not allowed during a global transa"

 
K Mansoor
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All-

I'm not calling commit() anywhere in my code, but am getting this error:


I'm able to read an object from DB, but not persist. Any help would be greatly appreciated.
 
Code Incomplete
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you find a resolution to this yet?
I'm fighting the same issue, slightly different env (WAS 7.0.0.13 + jpa 2.0 FeP, sqlserver 2005)
 
Code Incomplete
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a solution posted in another forum:
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=260658

In my case, the solution amounted to setting a custom property on the XA datasource
property: nonTransactionalDataSource
value: true

this seems counter-intuitive, since I'm specifically trying to perform transactions with this datasource...

I have my project configured to the point where I can comment/uncomment sections in 2 files to swap back and forth
between Hibernate and OpenJPA as the persistence provider. This setting was not required for Hibernate, but it does not
seem to negatively affect the Hibernate configuration.
 
Code Incomplete
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please note that the environment for the previous posted solution
was different from the originally posed problem.
My environment is:
WAS 7.0.0.13 + JPA 2.0 FeaturePak
Spring 3.x
OpenJPA 2.0 (snapshot version which comes with the feature pak)

Also swapped the same application to use Hibernate 3.5-FINAL
Using container-managed transactions

Hopefully the same will work for the WAS 6, JPA 1.0 environment
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic