• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

<openjpa-1.0.3-SNAPSHOT-nonfatal store error> org.apache.openjpa.persistence.OptimisticLockException

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using Open Jpa for the DB layer of my application, the database being DB2. I have a bean which saves data to a table. This works perfectly fine on my environment but when I deploy the very same EAR on a server machine, it gives me the optimistic lock exception.

I have tried restarting the DB but it doesnt work. I have searched the net and still have no clarity as to why it works in one env and not on the other.

Note: Both the environments have identical Database installations.

Any inputs / cues are welcome. I need to understand what I am doin wrong here!
 
Annu Vinayak
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the reason for this exception, the table which I was trying to update did not have any constraints defined on it, not even primary key. Accidently, the same data scripts had been run twice thus returning two rows for update.

I still dont know why Open Jpa should throw an OptimisticLockException, but that is what the issue was.

Thanks anyway!
 
What's brown and sticky? ... a stick. Or a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic