Community
Participate
Working Groups
Following tests failed from foundation test on Sybase 15.5 with Jconnect: EL : 2.4.0.v20120129-r10758 JDK: 1.6.0_29 ------ org.eclipse.persistence.testing.tests.expressions.ReadAllExpressionTest.MultiPlatformTest org.eclipse.persistence.testing.tests.expressions.ReadAllExpressionTest.MultiPlatformTest2 org.eclipse.persistence.testing.tests.expressions.ReadAllExpressionTest.MultiPlatformTest3 --------- Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120129-r10758): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed. Use the CONVERT function to run this query. Error Code: 257 Call: SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.GENDER, t0.L_NAME, t1.SALARY, 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 (((((CASE ISNULL(t0.F_NAME, ?) WHEN ? THEN ? WHEN ? THEN ? WHEN ? THEN ? ELSE ? END = ?) AND (t1.SALARY % ? = ?)) AND (CEILING(t1.SALARY) = ?)) AND (CHAR_LENGTH(t0.F_NAME) = ?)) AND (t1.EMP_ID = t0.EMP_ID)) bind => [13 parameters bound] Query: ReadAllQuery(referenceClass=Employee sql="SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t0.GENDER, t0.L_NAME, t1.SALARY, 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 (((((CASE ISNULL(t0.F_NAME, ?) WHEN ? THEN ? WHEN ? THEN ? WHEN ? THEN ? ELSE ? END = ?) AND (t1.SALARY % ? = ?)) AND (CEILING(t1.SALARY) = ?)) AND (CHAR_LENGTH(t0.F_NAME) = ?)) AND (t1.EMP_ID = t0.EMP_ID))") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535) at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1720) at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:1199) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:646) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2672) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2631) at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:420) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1085) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:852) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1044) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392) at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2834) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1519) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1452) at org.eclipse.persistence.testing.framework.ReadAllTest.test(ReadAllTest.java:116) at org.eclipse.persistence.testing.tests.expressions.ReadAllExpressionTest.test(ReadAllExpressionTest.java:153) at org.eclipse.persistence.testing.framework.TestCase.executeTest(TestCase.java:545) at org.eclipse.persistence.testing.framework.TestCase.execute(TestCase.java:156) at org.eclipse.persistence.testing.framework.TestCase.runBare(TestCase.java:265) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248) 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:248) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:211) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:211) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313) Caused by: java.sql.SQLException: Implicit conversion from datatype 'VARCHAR' to 'INT' is not allowed. Use the CONVERT function to run this query.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
I have seen the same issue in our tests. This seems to be a bug in the Sybase jConnect driver which occurs when the SQL contains a CASE-WHEN-THEN expression in the WHERE clause. I have reported this issue to Sybase support and they opened a bug sheet: http://www-dse.sybase.com/cgi-bin/websql/websql.dir/QTS/bugsheet.hts?bugid=737381 I also observed that the error disappears when the parameter DYNAMIC_PREPARE=false is set. Since this is a Sybase rather than an EclipseLink issue, I think this bug can be closed.
We should skip this test on Sybase and close the bug as NOT_ECLIPSE
Created attachment 232545 [details] Test updates
Changes have been submitted to 2.5.1 and master. Awaiting on 2.4.3 stream to open.
Changes pushed to 2.4.3 stream
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink