Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370154 - in Sybase, ReadAllExpressionTest.MultiPlatformTests failed during to Varchar to int conversion
Summary: in Sybase, ReadAllExpressionTest.MultiPlatformTests failed during to Varchar ...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: sybase
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 14:31 EST by Praba Vijayaratnam CLA
Modified: 2022-06-09 10:24 EDT (History)
4 users (show)

See Also:


Attachments
Test updates (2.01 KB, patch)
2013-06-19 11:12 EDT, Guy Pelletier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Praba Vijayaratnam CLA 2012-01-30 14:31:30 EST
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.
Comment 1 Tom Ware CLA 2012-02-17 10:43:52 EST
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.
Comment 2 Sabine Heider CLA 2013-05-27 06:14:16 EDT
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.
Comment 3 Tom Ware CLA 2013-05-27 08:24:51 EDT
We should skip this test on Sybase and close the bug as NOT_ECLIPSE
Comment 4 Guy Pelletier CLA 2013-06-19 11:12:23 EDT
Created attachment 232545 [details]
Test updates
Comment 5 Guy Pelletier CLA 2013-06-19 11:21:52 EDT
Changes have been submitted to 2.5.1 and master. Awaiting on 2.4.3 stream to open.
Comment 6 Guy Pelletier CLA 2013-07-16 13:21:16 EDT
Changes pushed to 2.4.3 stream
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:24:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink