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

<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!
reply
    Bookmark Topic Watch Topic
  • New Topic