db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject Exception using application identity, inheritance strategy "new-table"
Date Mon, 25 Jul 2005 16:11:48 GMT
Hi Andy, Erik,

I'm testing a new mapping wrt inheritance. For this purpose, I wrote a 
new schema file and a new orm file based on the company model for 
application identity. The mapping applies inheritance strategy 
"new-table" in conjunction with a join condition for subclassses classes 
Employee, PartTimeEmployee, FullTimeEmployee, MedicalInsurance, and 
FullTimeInsurance.

We use the CompletenessTest for testing different mappings. The test 
persists some objects. Afterwards it checks if the objects in database 
and in memory are equal.

When I run the CompletenessTest using that mapping, then I receive a 
SQL Exception (see below). The exception is thrown at check time. This 
means, that object have been made persistent successfully. The database 
contains reasonable entries.

I'm not sure if the exception is thrown due to an error in the mapping 
or due to a bug in JPOX. Can you please check the attached files? I 
attached the schema file and the orm file. You find the corresponding 
Java files in TCK20 subproject in package "org.apache.jdo.tck.pc.company".

Regards,
Michael

test(org.apache.jdo.tck.mapping.CompletenessTest)javax.jdo.JDODataStoreException: 
Fetch request failed: SELECT 
applicationidentity1.DENTALINSURANCE.INSID,applicationidentity1.PERSONS.PERSONID 
FROM applicationidentity1.EMPLOYEES LEFT OUTER JOIN 
applicationidentity1.INSURANCEPLANS ON 
applicationidentity1.EMPLOYEES.PERSONID = applicationidentity1.
INSURANCEPLANS.EMPLOYEE INNER JOIN applicationidentity1.PERSONS ON 
applicationidentity1.EMPLOYEES.PERSONID = application
identity1.PERSONS.PERSONID WHERE (applicationidentity1.PERSONS.PERSONID = ?)
     [java]      at 
org.jpox.store.rdbms.request.FetchRequest.execute(FetchRequest.java:196)
     [java]      at 
org.jpox.store.rdbms.table.ClassTable.fetch(ClassTable.java:1771)
     [java]      at 
org.jpox.store.rdbms.table.ClassTable.fetch(ClassTable.java:1764)
     [java]      at org.jpox.store.StoreManager.fetch(StoreManager.java:684)
     [java]      at 
org.jpox.state.StateManagerImpl.loadNonDFGFields(StateManagerImpl.java:1612)
     [java]      at 
org.jpox.state.StateManagerImpl.isLoaded(StateManagerImpl.java:1733)
     [java]      at 
org.apache.jdo.tck.pc.company.Employee.jdoGetdentalInsurance(Employee.java)
     [java]      at 
org.apache.jdo.tck.pc.company.Employee.deepCompareFields(Employee.java:455)
     [java]      at 
org.apache.jdo.tck.pc.company.FullTimeEmployee.deepCompareFields(FullTimeEmployee.java:119)
     [java]      at 
org.apache.jdo.tck.mapping.CompletenessTest.test(CompletenessTest.java:99)
     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
     [java]      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197)
     [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
     [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)
     [java] NestedThrowablesStackTrace:
     [java] ERROR 42X04: Column 
'APPLICATIONIDENTITY1.DENTALINSURANCE.INSID' is not in any table in the 
FROM list or it a
ppears within a join specification and is outside the scope of the join 
specification or it appears in a HAVING clause a
nd is not in the GROUP BY list.  If this is a CREATE or ALTER TABLE 
statement then 'APPLICATIONIDENTITY1.DENTALINSURANCE
.INSID' is not a column in the target table.
     [java]      at 
org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
     [java]      at 
org.apache.derby.impl.sql.compile.ColumnReference.bindExpression(ColumnReference.java)
     [java]      at 
org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java)
     [java]      at 
org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java)
     [java]      at 
org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(SelectNode.java)
     [java]      at 
org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java)
     [java]      at 
org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java)
     [java]      at 
org.apache.derby.impl.sql.compile.ReadCursorNode.bind(ReadCursorNode.java)
     [java]      at 
org.apache.derby.impl.sql.compile.CursorNode.bind(CursorNode.java)
     [java]      at 
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java)
     [java]      at 
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java)
     [java]      at 
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLangu
ageConnectionContext.java)
     [java]      at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java)
     [java]      at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java)
     [java]      at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java)
     [java]      at 
org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Driver30.java)
     [java]      at 
org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java)
     [java]      at 
org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java)
     [java]      at 
com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:303)
     [java]      at 
org.jpox.store.rdbms.request.FetchRequest.execute(FetchRequest.java:140)
     [java]      at 
org.jpox.store.rdbms.table.ClassTable.fetch(ClassTable.java:1771)
     [java]      at 
org.jpox.store.rdbms.table.ClassTable.fetch(ClassTable.java:1764)
     [java]      at org.jpox.store.StoreManager.fetch(StoreManager.java:684)
     [java]      at 
org.jpox.state.StateManagerImpl.loadNonDFGFields(StateManagerImpl.java:1612)
     [java]      at 
org.jpox.state.StateManagerImpl.isLoaded(StateManagerImpl.java:1733)
     [java]      at 
org.apache.jdo.tck.pc.company.Employee.jdoGetdentalInsurance(Employee.java)
     [java]      at 
org.apache.jdo.tck.pc.company.Employee.deepCompareFields(Employee.java:455)
     [java]      at 
org.apache.jdo.tck.pc.company.FullTimeEmployee.deepCompareFields(FullTimeEmployee.java:119)
     [java]      at 
org.apache.jdo.tck.mapping.CompletenessTest.test(CompletenessTest.java:99)
     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
     [java]      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197)
     [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
     [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)
-- 
-------------------------------------------------------------------
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/
-------------------------------------------------------------------

Mime
View raw message