db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bouschen (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (JDO-93) CompletenessTest fails when navigating a self-referencing relationship
Date Sat, 22 Apr 2006 19:44:12 GMT
     [ http://issues.apache.org/jira/browse/JDO-93?page=all ]
     
Michael Bouschen reopened JDO-93:
---------------------------------


> CompletenessTest fails when navigating a self-referencing relationship
> ----------------------------------------------------------------------
>
>          Key: JDO-93
>          URL: http://issues.apache.org/jira/browse/JDO-93
>      Project: JDO
>         Type: Bug

>   Components: tck20
>     Reporter: Michael Bouschen
>     Assignee: Erik Bengtson

>
> Running the CompletenessTest results in a JDODataStoreException with a nested exception
complaining about the generated SQL:
> ERROR 42X03: Column name 'APPLICATIONIDENTITY0.PERSONS.PERSONID' is in more than one
table in the FROM list.
> The test traverses a graph of persistent objects and calls getProtege on a FullTimeEmployee
instance. This navigates the protege<->mentor relationship specified in the superclass
Employee. Please note, protege<->mentor is a self referencing relationship from Employee
to Employee. 
> The error message reads as if the generated SQL misses to specify a table alias for the
table in the JOIN clause. 
> I use the following configuration stored in test/conf/onetest.conf:
> jdo.tck.description = Completeness test with standard mapping, basic testdata with no
relationships. 
> jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
> jdo.tck.testdata = org.apache.jdo.tck.pc.company.companyNoRelationships.xml
> jdo.tck.standarddata = 
> jdo.tck.mapping = 0
> This is the maven call:
> maven -o -Djdo.tck.cfglist=onetest.conf -Djdo.tck.identitytypes=applicationidentity runtck.jdori
> Here is the stacktrace:
> test(org.apache.jdo.tck.mapping.CompletenessTest)javax.jdo.JDODataStoreException: Fetch
request failed: SELECT applicationidentity0.PERSONS.PERSONID FROM applicationidentity0.PERSONS
LEFT OUTER JOIN applicationidentity0.PERSONS ON applicationidentity0.PERSONS.PERSONID = applicationidentity0.PERSONS.MENTOR
WHERE (applicationidentity0.PERSONS.PERSONID = ?)
>         at org.jpox.store.rdbms.request.FetchRequest.execute(FetchRequest.java:196)
>         at org.jpox.store.rdbms.table.ClassTable.fetch(ClassTable.java:1771)
>         at org.jpox.store.StoreManager.fetch(StoreManager.java:684)
>         at org.jpox.state.StateManagerImpl.loadNonDFGFields(StateManagerImpl.java:1612)
>         at org.jpox.state.StateManagerImpl.isLoaded(StateManagerImpl.java:1733)
>         at org.apache.jdo.tck.pc.company.Employee.jdoGetprotege(Employee.java)
>         at org.apache.jdo.tck.pc.company.Employee.deepCompareFields(Employee.java:455)
>         at org.apache.jdo.tck.pc.company.FullTimeEmployee.deepCompareFields(FullTimeEmployee.java:119)
>         at org.apache.jdo.tck.mapping.CompletenessTest.test(CompletenessTest.java:102)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
>         at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
>         at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)
> NestedThrowablesStackTrace:
> ERROR 42X03: Column name 'APPLICATIONIDENTITY0.PERSONS.PERSONID' is in more than one
table in the FROM list.
>         at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
>         at org.apache.derby.impl.sql.compile.JoinNode.getMatchingColumn(JoinNode.java)
>         at org.apache.derby.impl.sql.compile.FromList.bindColumnReference(FromList.java)
>         at org.apache.derby.impl.sql.compile.ColumnReference.bindExpression(ColumnReference.java)
>         at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(ResultColumn.java)
>         at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(ResultColumnList.java)
>         at org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(SelectNode.java)
>         at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(DMLStatementNode.java)
>         at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java)
>         at org.apache.derby.impl.sql.compile.ReadCursorNode.bind(ReadCursorNode.java)
>         at org.apache.derby.impl.sql.compile.CursorNode.bind(CursorNode.java)
>         at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java)
>         at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java)
>         at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(EmbedPreparedStatement20.java)
>         at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(EmbedPreparedStatement30.java)
>         at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Driver30.java)
>         at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java)
>         at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java)
>         at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:303)
>         at org.jpox.store.rdbms.request.FetchRequest.execute(FetchRequest.java:140)
>         at org.jpox.store.rdbms.table.ClassTable.fetch(ClassTable.java:1771)
>         at org.jpox.store.StoreManager.fetch(StoreManager.java:684)
>         at org.jpox.state.StateManagerImpl.loadNonDFGFields(StateManagerImpl.java:1612)
>         at org.jpox.state.StateManagerImpl.isLoaded(StateManagerImpl.java:1733)
>         at org.apache.jdo.tck.pc.company.Employee.jdoGetprotege(Employee.java)
>         at org.apache.jdo.tck.pc.company.Employee.deepCompareFields(Employee.java:455)
>         at org.apache.jdo.tck.pc.company.FullTimeEmployee.deepCompareFields(FullTimeEmployee.java:119)
>         at org.apache.jdo.tck.mapping.CompletenessTest.test(CompletenessTest.java:102)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
>         at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
>         at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)

-- 
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


Mime
View raw message