IBM Support

PI67305: EclipseLink assigns the same object instance to multiple embedded fields

Fixes are available

16.0.0.3: WebSphere Application Server Liberty 16.0.0.3
16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
9.0.0.3: WebSphere Application Server traditional V9.0 Fix Pack 3
9.0.0.4: WebSphere Application Server traditional V9.0 Fix Pack 4
9.0.0.5: WebSphere Application Server traditional V9.0 Fix Pack 5
9.0.0.6: WebSphere Application Server traditional V9.0 Fix Pack 6
9.0.0.7: WebSphere Application Server traditional V9.0 Fix Pack 7
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
9.0.0.8: WebSphere Application Server traditional V9.0 Fix Pack 8
9.0.0.9: WebSphere Application Server traditional V9.0 Fix Pack 9
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
9.0.0.10: WebSphere Application Server traditional V9.0 Fix Pack 10
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
9.0.0.11: WebSphere Application Server traditional V9.0 Fix Pack 11
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
9.0.5.0: WebSphere Application Server traditional Version 9.0.5 Refresh Pack
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
9.0.5.1: WebSphere Application Server traditional Version 9.0.5 Fix Pack 1
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
9.0.5.2: WebSphere Application Server traditional Version 9.0.5 Fix Pack 2
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
9.0.5.3: WebSphere Application Server traditional Version 9.0.5 Fix Pack 3
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
9.0.5.4: WebSphere Application Server traditional Version 9.0.5 Fix Pack 4
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
9.0.5.5: WebSphere Application Server traditional Version 9.0.5 Fix Pack 5
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12
WebSphere Application Server traditional 9.0.5.6
21.0.0.3: WebSphere Application Server Liberty 21.0.0.3
9.0.5.7: WebSphere Application Server traditional Version 9.0.5 Fix Pack 7
21.0.0.4: WebSphere Application Server Liberty 21.0.0.4
21.0.0.5: WebSphere Application Server Liberty 21.0.0.5
21.0.0.6: WebSphere Application Server Liberty 21.0.0.6
9.0.5.8: WebSphere Application Server traditional Version 9.0.5.8
21.0.0.7: WebSphere Application Server Liberty 21.0.0.7
21.0.0.1: WebSphere Application Server Liberty 21.0.0.1
21.0.0.2: WebSphere Application Server Liberty 21.0.0.2
21.0.0.8: WebSphere Application Server Liberty 21.0.0.8
21.0.0.9: WebSphere Application Server Liberty 21.0.0.9
9.0.5.9: WebSphere Application Server traditional Version 9.0.5.9
21.0.0.10: WebSphere Application Server Liberty 21.0.0.10
21.0.0.11: WebSphere Application Server Liberty 21.0.0.11
21.0.0.12: WebSphere Application Server Liberty 21.0.0.12
9.0.5.10: WebSphere Application Server traditional Version 9.0.5.10
22.0.0.1: WebSphere Application Server Liberty 22.0.0.1
22.0.0.2: WebSphere Application Server Liberty 22.0.0.2
22.0.0.3: WebSphere Application Server Liberty 22.0.0.3
9.0.5.11: WebSphere Application Server traditional Version 9.0.5.11
22.0.0.4: WebSphere Application Server Liberty 22.0.0.4

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When assigning the same object instance to two fields of an
    embeddable type of an entity, the eclipselink embedded in
    websphere creates a broken sql update statement and crashes.
    This causes business transactions to be rolled back.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Java Persistence API       *
    *                  (JPA)                                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: EclipseLink Embeddables creates a       *
    *                      broken SQL update statement when        *
    *                      assigning the same embeddable, java     *
    *                      instance.                               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    public SomeEntity update() {
    SomeEntity object =
    (SomeEntity)this.entityManager.find(SomeEntity.class, "PK");
    String value = String.valueOf(System.currentTimeMillis());
    SomeEmbedded embedded = new SomeEmbedded(value);
    object.setEmbedded1(embedded);
    object.setEmbedded2(embedded);
    return object;
    }
    Exception:
    Duplicate column name "EMB2"; SQL statement:
    UPDATE SOMEENTITY SET emb2 = ?, emb2 = ? WHERE (ID = ?) [42121-
    191]
    Fehlercode:42121
    Aufruf: UPDATE SOMEENTITY SET emb2 = ?, emb2 = ? WHERE (ID = ?)
    bind => [3 parameters bound]
    Abfrage: UpdateObjectQuery(versioncolumn.SomeEntity@3ba40476)
    at
    org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl$1.ha
    ndleException(EntityManagerSetupImpl.java:767)
    at
    org.eclipse.persistence.transaction.AbstractSynchronizationListe
    ner.handleException(AbstractSynchronizationListener.java:275)
    at
    org.eclipse.persistence.transaction.AbstractSynchronizationListe
    ner.beforeCompletion(AbstractSynchronizationListener.java:170)
    at
    org.eclipse.persistence.transaction.JTASynchronizationListener.b
    eforeCompletion(JTASynchronizationListener.java:68)
    at
    com.ibm.tx.jta.impl.RegisteredSyncs.coreDistributeBefore(Registe
    redSyncs.java:291)
    at
    com.ibm.tx.jta.impl.RegisteredSyncs.distributeBefore(RegisteredS
    yncs.java:192)
    at
    com.ibm.tx.jta.impl.TransactionImpl.prePrepare(TransactionImpl.j
    ava:1663)
    at
    com.ibm.tx.jta.impl.TransactionImpl.stage1CommitProcessing(Trans
    actionImpl.java:1057)
    at
    com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImp
    l.java:1032)
    at
    com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:
    975)
    at
    com.ibm.tx.jta.impl.TranManagerImpl.commit(TranManagerImpl.java:
    237)
    at
    com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:19
    1)
    at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:866)
    at
    com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:188)
    at
    com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionCon
    trolImpl.java:482)
    at
    com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:
    3989)
    at
    versioncolumn.EJSLocalNSLService_d04a18f1.update(EJSLocalNSLServ
    ice_d04a18f1.java)
    at versioncolumn.TestResource.update(TestResource.java:20)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.java:62)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    AccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    

Problem conclusion

Temporary fix

  • public SomeEntity update() {
        SomeEntity object =
    (SomeEntity)this.entityManager.find(SomeEntity.class, "PK");
        String value = String.valueOf(System.currentTimeMillis());
        object.setEmbedded1(new SomeEmbedded(value));
        object.setEmbedded2(new SomeEmbedded(value));
        return object;
      }
    

Comments

APAR Information

  • APAR number

    PI67305

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-08-09

  • Closed date

    2016-08-22

  • Last modified date

    2016-11-04

  • 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 LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • RCD0 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
03 May 2022