You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Michael Watzek (JIRA)" <ji...@apache.org> on 2006/01/30 17:41:34 UTC

[jira] Updated: (JDO-285) Fix list of teardown classes in company model reader.

     [ http://issues.apache.org/jira/browse/JDO-285?page=all ]

Michael Watzek updated JDO-285:
-------------------------------

    Attachment: JDO-285.patch

The attached patch fixes this issue. It contains two changes:

1) It fixes the order of teardown classes,
2) It fixes call getExtent with subclasses equals true in method getAllObjects.

Some more comments related to this patch:

After this patch is applied, configuration inheritance4 will fail for both, application identity and datastore identity. The runs for both identity types throw exceptions during tearDown:

- Application identity: 
javax.jdo.JDOFatalUserException: Cannot create new instance of class "org.apache.jdo.tck.pc.company.Employee". If this is an abstract class, make sure you dont have a row for that class in the database without a corresponding row in any concrete subclass table.  (see below)

- Datastore identity:
java.lang.NullPointerException  (see below)

As a consequence, subsequent runs will throw duplicate key exceptions unless you clear schema4 manually. 

There are two more issues related to this patch: 

1) Running configuration inheritance4 is very slow. On my system, it takes about 6 minutes. Usually, inheritance4 takes less than 1 minute. 
2) Memory consumption is increasing, when inheritance4 is run with this patch. The VM size is about 550 MB. Without this patch th VM size is about 30 MB running configuration inheritance4.

For these reasons, we propose that JPOX first fixes the problems above, before the patch is checked in.

doRuntck.jdori:
    [java] RUN CompletenessTest.test       ERROR
    [java] Description: Completeness test with inheritance mapping 4: Person, Employee, and Insurance have inheritance s
trategy new-table. PartTimeEmployee, FullTimeEmployee, MedicalInsurance, and DentalInsurance have inheritance strategy s
uperclass-table.
    [java] Time: 082
    [java] There was 1 error:
    [java] 1) test(org.apache.jdo.tck.mapping.CompletenessTest)javax.jdo.JDOFatalException: Exception during tearDown
    [java]      at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:306)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:234)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
    [java] NestedThrowablesStackTrace:
    [java] javax.jdo.JDOFatalUserException: Cannot create new instance of class "org.apache.jdo.tck.pc.company.Employee"
. If this is an abstract class, make sure you dont have a row for that class in the database without a corresponding row
 in any concrete subclass table.
    [java]      at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:420)
    [java]      at org.jpox.AbstractPersistenceManager.getObjectByAID(AbstractPersistenceManager.java:2326)
    [java]      at org.jpox.store.query.PersistentIDROF.getObjectByAID(PersistentIDROF.java:211)
    [java]      at org.jpox.store.query.PersistentIDROF.getObject(PersistentIDROF.java:162)
    [java]      at org.jpox.store.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:113)
    [java]      at org.jpox.store.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:103)
    [java]      at org.jpox.store.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:164)
    [java]      at org.jpox.AbstractPersistenceManager.notifyQueriesOfConnectionClose(AbstractPersistenceManager.java:32
41)
    [java]      at org.jpox.AbstractPersistenceManager.preRollback(AbstractPersistenceManager.java:3253)
    [java]      at org.jpox.NonmanagedTransaction.rollback(NonmanagedTransaction.java:554)
    [java]      at org.apache.jdo.tck.JDO_Test.cleanupPM(JDO_Test.java:473)
    [java]      at org.apache.jdo.tck.JDO_Test.cleanupPM(JDO_Test.java:460)
    [java]      at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses(JDO_Test.java:402)
    [java]      at org.apache.jdo.tck.JDO_Test.localTearDown(JDO_Test.java:318)
    [java]      at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:287)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:234)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
    [java] FAILURES!!!
    [java] Error summary:
    [java] 001 error:  javax.jdo.JDOFatalUserException: Cannot create new instance of class "org.apache.jdo.tck.pc.compa
ny.Employee". If this is an abstract class, make sure you dont have a row for that class in the database without a corre
sponding row in any concrete subclass table.
    [java] derby-app-inheritance4-junit.txt:
    [java]     ** Tests run: 001, Time: 082 seconds. Failures: 0, Errors: 1
    [java] Excluded tests: [org.apache.jdo.tck.enhancement.FieldAccessModified, org.apache.jdo.tck.enhancement.Implement
sPersistenceCapable]
    [java] [ERROR] Java Result: 1
    [echo] Finished run with database="derby" identitytype="applicationidentity" mapping="4".

exclude:

doRuntck.jdori:
Overriding previous definition of reference to this.jdori.classpath
    [java] RUN CompletenessTest.test       ERROR
    [java] Description: Completeness test with inheritance mapping 4: Person, Employee, and Insurance have inheritance s
trategy new-table. PartTimeEmployee, FullTimeEmployee, MedicalInsurance, and DentalInsurance have inheritance strategy s
uperclass-table.
    [java] Time: 239
    [java] There was 1 error:
    [java] 1) test(org.apache.jdo.tck.mapping.CompletenessTest)javax.jdo.JDOFatalException: Exception during tearDown
    [java]      at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:306)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:234)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
    [java] NestedThrowablesStackTrace:
    [java] java.lang.NullPointerException
    [java]      at org.jpox.state.StateManagerImpl.replaceFields(StateManagerImpl.java:2886)
    [java]      at org.jpox.store.query.PersistentIDROF$2.fetchFields(PersistentIDROF.java:243)
    [java]      at org.jpox.state.StateManagerImpl.loadFieldValues(StateManagerImpl.java:801)
    [java]      at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:511)
    [java]      at org.jpox.AbstractPersistenceManager.getObjectById(AbstractPersistenceManager.java:2367)
    [java]      at org.jpox.store.query.PersistentIDROF.getObjectById(PersistentIDROF.java:238)
    [java]      at org.jpox.store.query.PersistentIDROF.getObject(PersistentIDROF.java:175)
    [java]      at org.jpox.store.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:113)
    [java]      at org.jpox.store.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:103)
    [java]      at org.jpox.store.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:164)
    [java]      at org.jpox.AbstractPersistenceManager.notifyQueriesOfConnectionClose(AbstractPersistenceManager.java:32
41)
    [java]      at org.jpox.AbstractPersistenceManager.preRollback(AbstractPersistenceManager.java:3253)
    [java]      at org.jpox.NonmanagedTransaction.rollback(NonmanagedTransaction.java:554)
    [java]      at org.apache.jdo.tck.JDO_Test.cleanupPM(JDO_Test.java:473)
    [java]      at org.apache.jdo.tck.JDO_Test.cleanupPM(JDO_Test.java:460)
    [java]      at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses(JDO_Test.java:402)
    [java]      at org.apache.jdo.tck.JDO_Test.localTearDown(JDO_Test.java:318)
    [java]      at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:287)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:234)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
    [java] FAILURES!!!
    [java] Error summary:
    [java] 001 error:  java.lang.NullPointerException
    [java] derby-dsid-inheritance4-junit.txt:
    [java]     ** Tests run: 001, Time: 239 seconds. Failures: 0, Errors: 1
    [java] Excluded tests: [org.apache.jdo.tck.enhancement.FieldAccessModified, org.apache.jdo.tck.enhancement.Implement
sPersistenceCapable]
    [java] [ERROR] Java Result: 1
    [echo] Finished run with database="derby" identitytype="datastoreidentity" mapping="4".


result:
    [java] Total tests run: 2. Failures: 0, Errors: 2.
    [java] 2 of 2 configurations failed.
    [java] See file 'F:\users\brazil\jdo-cmp\jdo\trunk\tck20/target/logs/20060130-154940\TCK-results.txt' for details.
BUILD SUCCESSFUL
Total time: 6 minutes 18 seconds
Finished at: Mon Jan 30 15:55:03 CET 2006

> Fix list of teardown classes in company model reader.
> -----------------------------------------------------
>
>          Key: JDO-285
>          URL: http://issues.apache.org/jira/browse/JDO-285
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michael Watzek
>     Assignee: Michael Watzek
>  Attachments: JDO-285.patch
>
> The list of teardown classes in company model should not contain subclasses of inheritance hierarchies insurance and person. In t-conference, Jan 27, we agreed that the correct order is: Insurance.class, Person.class, Department.class, Company.class, Project.class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira