Fixes are available
6.1.0.33: Java SDK 1.5 SR12 FP1 Cumulative Fix for WebSphere
6.1.0.35: Java SDK 1.5 SR12 FP2 Cumulative Fix for WebSphere
6.1.0.37: Java SDK 1.5 SR12 FP3 Cumulative Fix for WebSphere
6.1.0.47: WebSphere Application Server V6.1 Fix Pack 47
6.1.0.39: Java SDK 1.5 SR12 FP4 Cumulative Fix for WebSphere Application Server
6.1.0.41: Java SDK 1.5 SR12 FP5 Cumulative Fix for WebSphere Application Server
6.1.0.43: Java SDK 1.5 SR13 Cumulative Fix for WebSphere Application Server
6.1.0.45: Java SDK 1.5 SR14 Cumulative Fix for WebSphere Application Server
6.1.0.47: Java SDK 1.5 SR16 Cumulative Fix for WebSphere Application Server
APAR status
Closed as program error.
Error description
The following error can occur when failing to set both sides of a two-sided relation between objects, or when mapping different fields to the same column and the values of the fields are not in synch [9/03/10 9:28:54:875 CET] 00000044 RegisteredSyn E WTRN0074E: Exception caught from before_completion synchronization operation: <openjpa-1.0.4-SNAPSHOT-r420667:748579 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImp l.java:2108) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1 853) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl .java:1771) at com.ibm.ws.uow.ComponentContextSynchronizationWrapper.beforeComp letion(ComponentContextSynchronizationWrapper.java:66) at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(Regi steredSyncs.java:242) at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(Transactio nImpl.java:2409) at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessin g(TransactionImpl.java:1642) at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(Transac tionImpl.java:1613) at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImp l.java:1548) . . Caused by: <openjpa-1.0.4-SNAPSHOT-r420667:748579 fatal user error> org.apache.openjpa.persistence.InvalidStateException: Attempt to set column "MESSAGE.VERSION" to two different values: (class java.lang.Integer)"2", (class java.lang.Integer)"3" This can occur when you fail to set both sides of a two-sided relation between objects, or when you map different fields to the same column, but you do not keep the values of these fields in synch. at org.apache.openjpa.jdbc.sql.PrimaryRow.setObject(PrimaryRow.java :338) at org.apache.openjpa.jdbc.sql.RowImpl.setObject(RowImpl.java:505) at org.apache.openjpa.jdbc.meta.strats.ColumnVersionStrategy.update (ColumnVersionStrategy.java:148) at org.apache.openjpa.jdbc.meta.Version.update(Version.java:298) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.updateIndic ators(AbstractUpdateManager.java:311) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.update(Abst ractUpdateManager.java:294) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.populateRow Manager(AbstractUpdateManager.java:152) at com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager.f lush(OperationOrderUpdateManager.java:88)
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Feature Pack for EJB 3.0 with JPA * * Entities which use life cycle callbacks. * **************************************************************** * PROBLEM DESCRIPTION: An InvalidStateException is thrown * * when modifying an entity which has a * * PreUpdate life cycle callback. * **************************************************************** * RECOMMENDATION: * **************************************************************** If an entity has a PreUpdate callback method which updates the entity the PreUpdate method will be called twice. The end result is a persistence exception - either the InvalidStateException shown above or an OptimisticLockException. This problem does not apply if there is no PreUpdate method or the PreUpdate method does not modify the entity.
Problem conclusion
The JPA Provider code has been modified to prevent any lifecycle callback methods from being invoked multiple times. The fix for this APAR is currently targeted for inclusion in fix pack 6.1.0.33. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM09938
Reported component name
WAS EJB3 FEATUR
Reported component ID
5724J0851
Reported release
610
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-03-15
Closed date
2010-04-08
Last modified date
2010-04-08
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WAS EJB3 FEATUR
Fixed component ID
5724J0851
Applicable component levels
R610 PSY
UP
Document Information
Modified date:
24 October 2021