Apache JDO Project - JDO_Test tearDown

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > March 2006 > JDO_Test tearDown





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author JDO_Test tearDown
Erik Bengtson

2006-03-27, 7:47 am

Hi,

During tearDown the below tests fails because it deletes instances of some
objects that does not have fixed schema name set in the ORM. For this reason
JPOX gets the default schema name and tries to delete objects from tables that
are set in a different schema.

The PersistenceManagerTest.localSetUp should be overwriten to delete only
classes used by these tests.

derby-app-schemaAttributeClass-junit.txt:
** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1
derby-app-schemaAttributeOrm-junit.txt:
** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1
derby-app-schemaAttributePackage-junit.txt:
** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1
derby-dsid-schemaAttributeClass-junit.txt:
** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1
derby-dsid-schemaAttributeOrm-junit.txt:
** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1
derby-dsid-schemaAttributePackage-junit.txt:
** Tests run: 001, Time: 005 seconds. Failures: 0, Errors: 1

1)
testMakePersistent(org.apache.jdo.tck.api.persistencemanager.lifecycle.MakePersistent)javax.jdo.JDOFatalException:
Exception during tearDown
at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:329)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:251)
at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
NestedThrowablesStackTrace:
javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT
THIS.DEPARTMENT_ID,THIS.DEPTID,THIS."NAME" FROM datastoreidentity7.DEPARTMENT
THIS" : Schema 'DATASTOREIDENTITY7' does not exist
ERROR 42Y07: Schema 'DATASTOREIDENTITY7' does not exist
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown
Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown
Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
at org.apache.derby.impl.sql.compile.ReadCursorNode.bind(Unknown Source)
at org.apache.derby.impl.sql.compile.CursorNode.bind(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:241)
at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:361)
at org.jpox.store.StatementText.prepareStatement(StatementText.java:204)
at org.jpox.store.query.Query.getStatement(Query.java:798)
at org.jpox.store.query.JDOQLQuery.performExecute(JDOQLQuery.java:520)
at org.jpox.store.query.Query.executeWithMap(Query.java:1114)
at org.jpox.store.query.Query.executeWithArray(Query.java:1087)
at org.jpox.store.query.Query.execute(Query.java:1010)
at org.apache.jdo.tck.JDO_Test.getAllObjects(JDO_Test.java:444)
at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses(JDO_Test.java:419)
at org.apache.jdo.tck.JDO_Test.localTearDown(JDO_Test.java:341)
at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:308)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:251)
at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
..
at org.jpox.store.query.JDOQLQuery.performExecute(JDOQLQuery.java:574)
at org.jpox.store.query.Query.executeWithMap(Query.java:1114)
at org.jpox.store.query.Query.executeWithArray(Query.java:1087)
at org.jpox.store.query.Query.execute(Query.java:1010)
at org.apache.jdo.tck.JDO_Test.getAllObjects(JDO_Test.java:444)
at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses(JDO_Test.java:419)
at org.apache.jdo.tck.JDO_Test.localTearDown(JDO_Test.java:341)
at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:308)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:251)
at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
FAILURES!!!
Error summary:
001 error: javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT
THIS.DEPARTMENT_ID,THIS.DEPTID,THIS."NAME" FROM datastoreidentity7.DEPARTMENT
THIS" : Schema 'DATASTOREIDENTITY7' does not exist
ERROR 42Y07: Schema 'DATASTOREIDENTITY7' does not exist
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown
Source)
at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown
Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown
Source)
at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
at org.apache.derby.impl.sql.compile.ReadCursorNode.bind(Unknown Source)
at org.apache.derby.impl.sql.compile.CursorNode.bind(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:241)
at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:361)
at org.jpox.store.StatementText.prepareStatement(StatementText.java:204)
at org.jpox.store.query.Query.getStatement(Query.java:798)
at org.jpox.store.query.JDOQLQuery.performExecute(JDOQLQuery.java:520)
at org.jpox.store.query.Query.executeWithMap(Query.java:1114)
at org.jpox.store.query.Query.executeWithArray(Query.java:1087)
at org.jpox.store.query.Query.execute(Query.java:1010)
at org.apache.jdo.tck.JDO_Test.getAllObjects(JDO_Test.java:444)
at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses(JDO_Test.java:419)
at org.apache.jdo.tck.JDO_Test.localTearDown(JDO_Test.java:341)
at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:308)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:251)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
..
derby-dsid-schemaAttributeClass-junit.txt:
** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1
Excluded tests: [org.apache.jdo.tck.enhancement.FieldAccessModified,
org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable]




Craig L Russell

2006-03-27, 7:47 am

Erik Bengtson

2006-03-27, 7:47 am

Craig,

Using nightly builds they will fail. I think this is an issue in the TCK.

Regards,

Selon Craig L Russell <Craig.Russell@Sun.COM>:

> Hi Erik,
>
> These tests passed recently. Do you know what changed to make these
> tests fail now?
>
> Thanks,
>
> Craig
>
> On Mar 26, 2006, at 2:01 PM, Erik Bengtson wrote:
>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>





Andy Jefferson

2006-03-27, 11:56 pm

Hi Erik,

> Using nightly builds they will fail. I think this is an issue in the TCK.


These all work fine with JPOX CVS as at 8pm CET yesterday.


--
Andy

Michael Bouschen

2006-03-27, 11:56 pm

Hi,

I did a clean build today and got 2 failures and 2 errors when running
the tck20 with the JPOX build that is available through maven.

Regards Michael

> Hi Erik,
>
>
>
>
> These all work fine with JPOX CVS as at 8pm CET yesterday.
>
>
> --
> Andy



--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin

Andy Jefferson

2006-03-30, 11:57 pm

Some more information, having tried with Erik's recent changes to JPOX.

Take the example of configuration "schemaAttributePackage.conf".
This is passing the "javax.jdo.mapping.Schema" property as "datastoreidentity6".
In the MetaData files (for PCPoint) it is using "datastoreidentity_pkg" (where
the schema for PCPoint is actually created)

The test itself runs fine since JPOX is using "datastoreidentity_pkg" and so passes.
JDO_Test tearDown works fine on the delete of PCPoint (since that class is in
"datastoreidentity_pkg" schema)
JDO_Test tearDown is also trying to delete data from "pc/company" too ... which
doesn't have such schema MetaData settings and so these fall back to the
"datastoreidentity6" schema that was passed to the PMF. This schema doesnt exist!




--
Andy

Craig L Russell

2006-03-30, 11:57 pm

Michelle Caisse

2006-03-30, 11:57 pm

Yes, I'll look into this.

-- Michelle

Craig L Russell wrote:

> Hi,
>
> This is clearly a bug, from your description. The reason it was
> working before was a counterbalancing bug in JPOX?
>
> Michelle, can you take a look at it?
>
> Thanks,
>
> Craig
>
> On Mar 27, 2006, at 11:35 PM, Andy Jefferson wrote:
>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>



Michael Watzek

2006-03-30, 11:57 pm

Hi,

configurations "schemaAttributeOrm.conf" (Mapping 5),
"schemaAttributePackage.conf" (Mapping 6), and
"schemaAttributeClass.conf" (Mapping 7) run test MakePersistent which
inherits from PersistenceManagerTest.

Class PersistentManagerTest implements localSetUp adding tear down
classes PCRect, PCPoint, Department, and Company. But Department and
Company are not contained in Mappings 5, 6, and 7. I propose to redefine
localSetUp in MakePersistent accordingly.

Perhaps it makes sense to add a comment to ORM metadata of mappings 5,
6, and 7. All of these mappings overwrite the default schema name passed
as PMF property. Those mappings assign a schema name which does not
comply to our schema name convention <identitytype><mapping>. A comment
would just be helpful to understand that this is done on purpose.

Regards,
Michael

Craig L Russell wrote:
> Hi,
>
> This is clearly a bug, from your description. The reason it was working
> before was a counterbalancing bug in JPOX?
>
> Michelle, can you take a look at it?
>
> Thanks,
>
> Craig
>
> On Mar 27, 2006, at 11:35 PM, Andy Jefferson wrote:
>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>



--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com