Bug 274566 - Three new JPA test cases failed on Oracle 11.1.0.7 DB
Summary: Three new JPA test cases failed on Oracle 11.1.0.7 DB
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-04-30 14:33 EDT by Kevin Yuan CLA
Modified: 2022-06-09 10:30 EDT (History)
2 users (show)

See Also:


Attachments
proposed patch (2.56 KB, patch)
2009-04-30 17:02 EDT, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Yuan CLA 2009-04-30 14:33:02 EDT
The following three new test cases failed on Oracle 11.1.0.7 DB, but passed on MySQL 5 DB:
- org.eclipse.persistence.testing.tests.jpa.advanced.JoinedAttributeAdvancedJunitTest.testProjectsQK:

- org.eclipse.persistence.testing.tests.jpa.advanced.JoinedAttributeAdvancedJunitTest.testLargeProjects:

- org.eclipse.persistence.testing.tests.jpa.advanced.JoinedAttributeAdvancedJunitTest.testEmployees:
Internal Exception: java.sql.SQLException: ORA-01417: a table may be outer joined to at most one other table Error Code: 1417 Call: SELECT DISTINCT t2.PROJ_TYPE FROM CMP3_EMP_PROJ t3, CMP3_PROJECT t2, CMP3_SALARY t1, CMP3_EMPLOYEE t0 WHERE ((t0.F_NAME = ?) AND (((t3.PROJECTS_PROJ_ID (+) = t2.PROJ_ID) AND (t3.EMPLOYEES_EMP_ID (+) = t0.EMP_ID)) AND (t1.EMP_ID (+) = t0.EMP_ID))) bind => [John] Query: ReadAllQuery(referenceClass=Project sql="SELECT DISTINCT t2.PROJ_TYPE FROM CMP3_EMP_PROJ t3, CMP3_PROJECT t2, CMP3_SALARY t1, CMP3_EMPLOYEE t0 WHERE ((t0.F_NAME = ?) AND (((t3.PROJECTS_PROJ_ID (+) = t2.PROJ_ID) AND (t3.EMPLOYEES_EMP_ID (+) = t0.EMP_ID)) AND (t1.EMP_ID (+) = t0.EMP_ID)))")

Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.1.1.qualifier): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01417: a table may be outer joined to at most one other table

Error Code: 1417
Call: SELECT DISTINCT t2.PROJ_TYPE FROM CMP3_EMP_PROJ t3, CMP3_PROJECT t2, CMP3_SALARY t1, CMP3_EMPLOYEE t0 WHERE ((t0.F_NAME = ?) AND (((t3.PROJECTS_PROJ_ID (+) = t2.PROJ_ID) AND (t3.EMPLOYEES_EMP_ID (+) = t0.EMP_ID)) AND (t1.EMP_ID (+) = t0.EMP_ID)))
bind => [John]
Query: ReadAllQuery(referenceClass=Project sql="SELECT DISTINCT t2.PROJ_TYPE FROM CMP3_EMP_PROJ t3, CMP3_PROJECT t2, CMP3_SALARY t1, CMP3_EMPLOYEE t0 WHERE ((t0.F_NAME = ?) AND (((t3.PROJECTS_PROJ_ID (+) = t2.PROJ_ID) AND (t3.EMPLOYEES_EMP_ID (+) = t0.EMP_ID)) AND (t1.EMP_ID (+) = t0.EMP_ID)))")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:332)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:656)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:501)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:536)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:262)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:599)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2520)
at org.eclipse.persistence.descriptors.InheritancePolicy.selectAllRowUsingDefaultMultipleTableSubclassRead(InheritancePolicy.java:1252)
at org.eclipse.persistence.descriptors.InheritancePolicy.selectAllRowUsingMultipleTableSubclassRead(InheritancePolicy.java:1320)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2476)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:481)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:928)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:889)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:458)
at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2243)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1165)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1125)
at org.eclipse.persistence.testing.tests.jpa.advanced.JoinedAttributeAdvancedJunitTest.testEmployees(JoinedAttributeAdvancedJunitTest.java:948)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:359)
Caused by: java.sql.SQLException: ORA-01417: a table may be outer joined to at most one other table

These failures related to Revision 4097 in EclipseLink 1.1.1 (Bug 274436: Custom QueryKeys fail to auto join, checked in by Andrei Ilitchev)
For detailed exception, please refer to the nightly results: http://stame02.us.oracle.com/eclipselink/1.1.0/2009-04-30/jpa-eclipselink.jpa.test-test-lrg-jdk16-oracle-11.html#org.eclipse.persistence.testing.tests.jpa
Comment 1 Andrei Ilitchev CLA 2009-04-30 17:02:18 EDT
Created attachment 134016 [details]
proposed patch

Fixed ManyToManyQueryKeys used by the tests - the original version passed with ANSI joins but failed with Oracle (+)= joins.
Comment 2 Andrei Ilitchev CLA 2009-04-30 17:08:15 EDT
Fixed.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:30:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink