Community
Participate
Working Groups
ReportQueryAndExistsSubQuery: ReportQuery and exists subQuery failed on Sybase Exception: ========== Internal Exception: com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near ','. Error Code: 102 Call: SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.L_NAME, t1.SALARY, t0.GENDER, t0.START_TIME, t0.END_TIME, t0.END_DATE, t0.START_DATE, t0.ADDR_ID, t0.MANAGER_ID, t0.VERSION FROM EMPLOYEE t0, SALARY t1 WHERE (EXISTS (SELECT DISTINCT t2.TYPE, t2.AREA_CODE, t2.P_NUMBER, t2.EMP_ID FROM SALARY t4, EMPLOYEE t3, PHONE t2 WHERE ((t4.EMP_ID = t3.EMP_ID) AND (t2.EMP_ID = t3.EMP_ID))) AND (t1.EMP_ID = t0.EMP_ID)) Query: ReportQuery(referenceClass=Employee sql="SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.L_NAME, t1.SALARY, t0.GENDER, t0.START_TIME, t0.END_TIME, t0.END_DATE, t0.START_DATE, t0.ADDR_ID, t0.MANAGER_ID, t0.VERSION FROM EMPLOYEE t0, SALARY t1 WHERE (EXISTS (SELECT DISTINCT t2.TYPE, t2.AREA_CODE, t2.P_NUMBER, t2.EMP_ID FROM SALARY t4, EMPLOYEE t3, PHONE t2 WHERE ((t4.EMP_ID = t3.EMP_ID) AND (t2.EMP_ID = t3.EMP_ID))) AND (t1.EMP_ID = t0.EMP_ID))") Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.1.0.20090115-SNAPSHOT): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near ','. Error Code: 102 Call: SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.L_NAME, t1.SALARY, t0.GENDER, t0.START_TIME, t0.END_TIME, t0.END_DATE, t0.START_DATE, t0.ADDR_ID, t0.MANAGER_ID, t0.VERSION FROM EMPLOYEE t0, SALARY t1 WHERE (EXISTS (SELECT DISTINCT t2.TYPE, t2.AREA_CODE, t2.P_NUMBER, t2.EMP_ID FROM SALARY t4, EMPLOYEE t3, PHONE t2 WHERE ((t4.EMP_ID = t3.EMP_ID) AND (t2.EMP_ID = t3.EMP_ID))) AND (t1.EMP_ID = t0.EMP_ID)) Query: ReportQuery(referenceClass=Employee sql="SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.L_NAME, t1.SALARY, t0.GENDER, t0.START_TIME, t0.END_TIME, t0.END_DATE, t0.START_DATE, t0.ADDR_ID, t0.MANAGER_ID, t0.VERSION FROM EMPLOYEE t0, SALARY t1 WHERE (EXISTS (SELECT DISTINCT t2.TYPE, t2.AREA_CODE, t2.P_NUMBER, t2.EMP_ID FROM SALARY t4, EMPLOYEE t3, PHONE t2 WHERE ((t4.EMP_ID = t3.EMP_ID) AND (t2.EMP_ID = t3.EMP_ID))) AND (t1.EMP_ID = t0.EMP_ID))") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:322) 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.internal.sessions.AbstractSession.executeCall(AbstractSession.java:872) 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:2512) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2457) at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:835) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:891) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:457) 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.queries.report.ReportQueryTestCase.test(ReportQueryTestCase.java:93) at org.eclipse.persistence.testing.framework.TestCase.executeTest(TestCase.java:543) at org.eclipse.persistence.testing.framework.TestCase.execute(TestCase.java:154) at org.eclipse.persistence.testing.framework.TestCase.runBare(TestCase.java:263) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:247) at org.eclipse.persistence.testing.framework.TestSuite.execute(TestSuite.java:75) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:247) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:247) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) Caused by: com.sybase.jdbc3.jdbc.SybSQLException: Incorrect syntax near ','. at com.sybase.jdbc3.tds.Tds.a(Unknown Source) at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source) at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeQuery(Unknown Source) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:856) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:573)
This bug fix did not make the cut off for 2.0.0. We are deferring the bugs to Future where we can properly sort them all together based on community votes and severity. We will then assign them accordingly to future patch sets and releases.
Changing the priority of the bugs that have been recently triaged to future. Targetting them to P2 will differentiate them from the P3s that have been triaged into future earlier.
2.1 Bug scrubbing, deferring to 2.1.1.
investigating
Created attachment 176182 [details] test case fix test cannot be run on Sybase as it does not support using a subquery to return multiple values within Exists. Fix is to add a warning when run on the Sybase platform adding, much like it does when run against Derby.
Test case change checked into main and 2.1.1
*** Bug 240014 has been marked as a duplicate of this bug. ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink