Forums Register Login

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

+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
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!
Then YOU must do the pig's work! Read this tiny ad. READ IT!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2023 times.
Similar Threads
Writing databse scripts which inturn checks for the tables, columns and constraints
Reading the record from the database
xml -> relational database and vice versa
What do we mean by this?
GUI-B&S
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:26:43.