OpenJPA
  1. OpenJPA
  2. OPENJPA-680

Flush followed by refresh on a new instance returns an instance with all fields but id cleared

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.2.1, 1.3.0
    • Fix Version/s: 1.1.1, 1.2.2, 1.3.0, 2.0.0-M1
    • Component/s: kernel
    • Labels:
      None

      Description

      This looks to be resolved. I'll mark the fix versions according to the commits and then resolve it.

      1. OPENJPA-680.patch
        2 kB
        Srinivasa
      2. testcase.zip
        1 kB
        Srinivasa

        Activity

        Hide
        Jerry Carter added a comment -

        Thanks, Kevin. It took a bit of thought, but I've come to understand the error of my ways.

        Show
        Jerry Carter added a comment - Thanks, Kevin. It took a bit of thought, but I've come to understand the error of my ways.
        Hide
        Kevin Sutter added a comment -

        Jerry,
        In your example, SimpleEntity e is no longer "new" once you called persist(e). At that point, e is now a managed instance and is a member of the persistence context. So, the IllegalArgumentException would not be expected in this case.

        Kevin

        Show
        Kevin Sutter added a comment - Jerry, In your example, SimpleEntity e is no longer "new" once you called persist(e). At that point, e is now a managed instance and is a member of the persistence context. So, the IllegalArgumentException would not be expected in this case. Kevin
        Hide
        Jerry Carter added a comment -

        Seeing the same behavior with OpenJPA 2.0.0-beta.

        Show
        Jerry Carter added a comment - Seeing the same behavior with OpenJPA 2.0.0-beta.
        Hide
        Jerry Carter added a comment -

        From the JPA 2.0 specification, section 3.2.5, "If [entity] X is a new, detached, or removed entity, the IllegalArgumentException is thrown".

        This does not appear to be the case under OpenJPA 1.2.2:

        SimpleEntity e = new SimpleEntity();
        em.persist(e);
        em.refresh(e);
        return e;

        I realize that OpenJPA 1.2.x is based on OpenJPA 1.0. That specification is ambiguous as to what behavior would be expected.

        Show
        Jerry Carter added a comment - From the JPA 2.0 specification, section 3.2.5, "If [entity] X is a new, detached, or removed entity, the IllegalArgumentException is thrown". This does not appear to be the case under OpenJPA 1.2.2: SimpleEntity e = new SimpleEntity(); em.persist(e); em.refresh(e); return e; I realize that OpenJPA 1.2.x is based on OpenJPA 1.0. That specification is ambiguous as to what behavior would be expected.
        Hide
        Srinivasa added a comment -

        after load and after refresh callbacks of openjpa were each resulting in a post load call resulting in the duplicates. Patch addressing the same and re-introducing the original fix.

        Show
        Srinivasa added a comment - after load and after refresh callbacks of openjpa were each resulting in a post load call resulting in the duplicates. Patch addressing the same and re-introducing the original fix.
        Hide
        Albert Lee added a comment -

        This patch has regressed the TCK in trunk and 1.2.x branch. The errors reported in openjpa-tck.log are:

        ------------------------------------------
        ********************************************************************************
        Beginning Test: com.sun.ts.tests.ejb30.persistence.callback.listener.Client.postLoadMultiTest_from_standalone
        ********************************************************************************
        08-12-2008 04:52:05: Harness - harness.executeMode is set to "0"
        08-12-2008 04:52:05: Harness - sClassPathFromExecProps =
        command: com.sun.ts.lib.harness.ExecTSTestCmd CLASSPATH=../classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/classes:/root/.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar:/root/.m2/repository/javax/persistence/persistence-api/1.0b/persistence-api-1.0b.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-kernel/target/classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-lib/target/openjpa-lib-1.3.0-SNAPSHOT.jar:/root/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/root/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar:/root/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/root/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/root/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/root/.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/ant_sun.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/apiCheck.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/javatest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-core.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/saxpath.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/sigtest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tsharness.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tspackager.jar:/opt/jetbrains/TeamCity/plugins/maven-2.0.8/boot/classworlds-1.1.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/:../lib/tsharness.jar:../lib/sigtest.jar:../classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/classes:/root/.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar:/root/.m2/repository/javax/persistence/persistence-api/1.0b/persistence-api-1.0b.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-kernel/target/classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-lib/target/openjpa-lib-1.3.0-SNAPSHOT.jar:/root/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/root/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar:/root/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/root/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/root/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/root/.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/ant_sun.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/apiCheck.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/javatest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-core.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/saxpath.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/sigtest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tsharness.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tspackager.jar:/opt/jetbrains/TeamCity/plugins/maven-2.0.8/boot/classworlds-1.1.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/:../lib/javatest.jar:../tools/ant/lib/ant.jar:/opt/jetbrains/jdk/sun/jdk5/jre/../lib/tools.jar:DISPLAY=:0.0:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/src/../dist/com/sun/ts/tests/ejb30/persistence/callback/listener/ejb3_pm_callback_listener.jar HOME=/root windir= SYSTEMROOT= /opt/jetbrains/jdk/sun/jdk5/jre/bin/java -Dcts.tmp=../tmp -Djava.security.policy=../bin/harness.policy -Ddeliverable.class=com.sun.ts.lib.deliverable.jpa.JPADeliverable -javaagent:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-all/target/openjpa-1.3.0-SNAPSHOT.jar -Dopenjpa.MetaDataFactory=jpa(DefaultAccessType=PROPERTY) com.sun.ts.tests.common.vehicle.VehicleClient -p ../tmp/tstest.jte -t postLoadMultiTest -vehicle standalone
        ************************************************************

        • props file set to "/tmp/root-cts-props.txt"
          ************************************************************
          setup
          platform.mode is set to standalone, so tests are running in J2SE environment standalone mode.persistence.unit.name is set to JPATCK
          persistence unit properites from user: {openjpa.jdbc.DBDictionary=StoreCharsAsNumbers=false, openjpa.FetchBatchSize=-1, openjpa.Compatibility=StrictIdentityValues=true, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.ConnectionURL=jdbc:derby:derby-database;create=true, openjpa.Sequence=time, openjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver, openjpa.Log=DefaultLevel=WARN, openjpa.ConnectionUserName=nousername, openjpa.jdbc.SchemaFactory=native(ForeignKeys=true), openjpa.ConnectionPassword=nopassword}

          persistence unit properites verified:

          {openjpa.jdbc.DBDictionary=StoreCharsAsNumbers=false, openjpa.FetchBatchSize=-1, openjpa.Compatibility=StrictIdentityValues=true, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.ConnectionURL=jdbc:derby:derby-database;create=true, openjpa.Sequence=time, openjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver, openjpa.Log=DefaultLevel=WARN, openjpa.ConnectionUserName=nousername, openjpa.jdbc.SchemaFactory=native(ForeignKeys=true), openjpa.ConnectionPassword=nopassword}

          Product: In prePersist in class com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@c8c7d6
          Product: In prePersist in class com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@18c5e67
          Product: In prePersist in class com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@89c116
          Product: In postPersist.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@1c79dfc
          Product: In postPersist.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@553763
          Product: In postPersist.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@a75737
          Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@7f3b8a
          Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@11e1bbf
          Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@1afd9cc
          Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@3e926
          Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@bfd66a
          Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@95f290
          org.apache.openjpa.kernel.DelegatingResultList@1566a6c
          08-12-2008 04:52:11: ERROR: Expecting result list: [ListenerA, ListenerB, ListenerC], but actual: [ListenerA, ListenerB, ListenerC, ListenerA, ListenerB, ListenerC]
          08-12-2008 04:52:11: ERROR: Exception at:
          08-12-2008 04:52:11: ERROR: com.sun.ts.lib.harness.EETest$Fault: Expecting result list: [ListenerA, ListenerB, ListenerC], but actual: [ListenerA, ListenerB, ListenerC, ListenerA, ListenerB, ListenerC]
          at com.sun.ts.tests.ejb30.common.helper.Helper.compareResultList(Helper.java:30)
          at com.sun.ts.tests.ejb30.common.helper.Helper.compareResultList(Helper.java:36)
          at com.sun.ts.tests.ejb30.persistence.callback.listener.Client.postLoadMultiTest(Client.java:565)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at com.sun.ts.lib.harness.EETest.run(EETest.java:495)
          at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:112)
          at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:30)
          at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:102)
          at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:392)
          at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:209)
          at com.sun.ts.lib.harness.EETest.run(EETest.java:204)
          at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:27)
          Find All Products
          Find All Orders
          Find All LineItems
          Cleanup done, calling super.cleanup
          STATUS:Failed.Test case throws exception: com.sun.ts.lib.harness.EETest$Fault: Expecting result list: [ListenerA, ListenerB, ListenerC], but actual: [ListenerA, ListenerB, ListenerC, ListenerA, ListenerB, ListenerC]
          ********************************************************************************
          Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.listener.Client.postLoadMultiTest_from_standalone
          ********************************************************************************
          Number of tests completed: 22 (21 passed, 1 failed, 0 with errors)

        There are 3 more similar failures in:

        Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.listeneroverride.Client.postLoadMultiTest_from_standalone
        Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.method.Client.postLoadMultiTest_from_standalone
        Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.methodoverride.Client.postLoadMultiTest_from_standalone

        I have verified this by removing the patch in both trunk and 1.2.x and TCK is passing again.

        I am going revert the change out of trunk and 1.2.x.

        Albert Lee.

        Show
        Albert Lee added a comment - This patch has regressed the TCK in trunk and 1.2.x branch. The errors reported in openjpa-tck.log are: ------------------------------------------ ******************************************************************************** Beginning Test: com.sun.ts.tests.ejb30.persistence.callback.listener.Client.postLoadMultiTest_from_standalone ******************************************************************************** 08-12-2008 04:52:05: Harness - harness.executeMode is set to "0" 08-12-2008 04:52:05: Harness - sClassPathFromExecProps = command: com.sun.ts.lib.harness.ExecTSTestCmd CLASSPATH=../classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/classes:/root/.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar:/root/.m2/repository/javax/persistence/persistence-api/1.0b/persistence-api-1.0b.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-kernel/target/classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-lib/target/openjpa-lib-1.3.0-SNAPSHOT.jar:/root/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/root/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar:/root/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/root/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/root/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/root/.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/ant_sun.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/apiCheck.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/javatest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-core.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/saxpath.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/sigtest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tsharness.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tspackager.jar:/opt/jetbrains/TeamCity/plugins/maven-2.0.8/boot/classworlds-1.1.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/:../lib/tsharness.jar:../lib/sigtest.jar:../classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/classes:/root/.m2/repository/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar:/root/.m2/repository/javax/persistence/persistence-api/1.0b/persistence-api-1.0b.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-kernel/target/classes:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-lib/target/openjpa-lib-1.3.0-SNAPSHOT.jar:/root/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/root/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar:/root/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/root/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/root/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.0.1/geronimo-jms_1.1_spec-1.0.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/root/.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/ant_sun.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/apiCheck.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/javatest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-core.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jaxen-jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/jdom.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/saxpath.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/sigtest.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tsharness.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/lib/tspackager.jar:/opt/jetbrains/TeamCity/plugins/maven-2.0.8/boot/classworlds-1.1.jar:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/:../lib/javatest.jar:../tools/ant/lib/ant.jar:/opt/jetbrains/jdk/sun/jdk5/jre/../lib/tools.jar:DISPLAY=:0.0:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-integration/tck/target/tck/jpatck/src/../dist/com/sun/ts/tests/ejb30/persistence/callback/listener/ejb3_pm_callback_listener.jar HOME=/root windir= SYSTEMROOT= /opt/jetbrains/jdk/sun/jdk5/jre/bin/java -Dcts.tmp=../tmp -Djava.security.policy=../bin/harness.policy -Ddeliverable.class=com.sun.ts.lib.deliverable.jpa.JPADeliverable -javaagent:/opt/jetbrains/TeamCity/work/98561997f875f84e/openjpa-all/target/openjpa-1.3.0-SNAPSHOT.jar -Dopenjpa.MetaDataFactory=jpa(DefaultAccessType=PROPERTY) com.sun.ts.tests.common.vehicle.VehicleClient -p ../tmp/tstest.jte -t postLoadMultiTest -vehicle standalone ************************************************************ props file set to "/tmp/root-cts-props.txt" ************************************************************ setup platform.mode is set to standalone, so tests are running in J2SE environment standalone mode.persistence.unit.name is set to JPATCK persistence unit properites from user: {openjpa.jdbc.DBDictionary=StoreCharsAsNumbers=false, openjpa.FetchBatchSize=-1, openjpa.Compatibility=StrictIdentityValues=true, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.ConnectionURL=jdbc:derby:derby-database;create=true, openjpa.Sequence=time, openjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver, openjpa.Log=DefaultLevel=WARN, openjpa.ConnectionUserName=nousername, openjpa.jdbc.SchemaFactory=native(ForeignKeys=true), openjpa.ConnectionPassword=nopassword} persistence unit properites verified: {openjpa.jdbc.DBDictionary=StoreCharsAsNumbers=false, openjpa.FetchBatchSize=-1, openjpa.Compatibility=StrictIdentityValues=true, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.ConnectionURL=jdbc:derby:derby-database;create=true, openjpa.Sequence=time, openjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver, openjpa.Log=DefaultLevel=WARN, openjpa.ConnectionUserName=nousername, openjpa.jdbc.SchemaFactory=native(ForeignKeys=true), openjpa.ConnectionPassword=nopassword} Product: In prePersist in class com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@c8c7d6 Product: In prePersist in class com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@18c5e67 Product: In prePersist in class com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@89c116 Product: In postPersist.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@1c79dfc Product: In postPersist.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@553763 Product: In postPersist.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@a75737 Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@7f3b8a Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@11e1bbf Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@1afd9cc Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerA@3e926 Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerB@bfd66a Product: In postLoad.com.sun.ts.tests.ejb30.persistence.callback.common.ListenerC@95f290 org.apache.openjpa.kernel.DelegatingResultList@1566a6c 08-12-2008 04:52:11: ERROR: Expecting result list: [ListenerA, ListenerB, ListenerC] , but actual: [ListenerA, ListenerB, ListenerC, ListenerA, ListenerB, ListenerC] 08-12-2008 04:52:11: ERROR: Exception at: 08-12-2008 04:52:11: ERROR: com.sun.ts.lib.harness.EETest$Fault: Expecting result list: [ListenerA, ListenerB, ListenerC] , but actual: [ListenerA, ListenerB, ListenerC, ListenerA, ListenerB, ListenerC] at com.sun.ts.tests.ejb30.common.helper.Helper.compareResultList(Helper.java:30) at com.sun.ts.tests.ejb30.common.helper.Helper.compareResultList(Helper.java:36) at com.sun.ts.tests.ejb30.persistence.callback.listener.Client.postLoadMultiTest(Client.java:565) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.ts.lib.harness.EETest.run(EETest.java:495) at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:112) at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:30) at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:102) at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:392) at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:209) at com.sun.ts.lib.harness.EETest.run(EETest.java:204) at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:27) Find All Products Find All Orders Find All LineItems Cleanup done, calling super.cleanup STATUS:Failed.Test case throws exception: com.sun.ts.lib.harness.EETest$Fault: Expecting result list: [ListenerA, ListenerB, ListenerC] , but actual: [ListenerA, ListenerB, ListenerC, ListenerA, ListenerB, ListenerC] ******************************************************************************** Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.listener.Client.postLoadMultiTest_from_standalone ******************************************************************************** Number of tests completed: 22 (21 passed, 1 failed, 0 with errors) There are 3 more similar failures in: Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.listeneroverride.Client.postLoadMultiTest_from_standalone Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.method.Client.postLoadMultiTest_from_standalone Finished Test: FAILED........com.sun.ts.tests.ejb30.persistence.callback.methodoverride.Client.postLoadMultiTest_from_standalone I have verified this by removing the patch in both trunk and 1.2.x and TCK is passing again. I am going revert the change out of trunk and 1.2.x. Albert Lee.
        Hide
        Srinivasa added a comment -

        Testcase

        Show
        Srinivasa added a comment - Testcase

          People

          • Assignee:
            Srinivasa
            Reporter:
            Srinivasa
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development