Bug 362 : Oracle specific issue - Fail to convert to internal representation ... with RawSql and rownum use
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.3
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
16/03/2011
Updated 
16/03/2011
Type 
Bug
 
Attachments 
No attachments

Caused by: java.sql.SQLException: Fail to convert to internal representation
at oracle.jdbc.driver.CharCommonAccessor.getInt(CharCommonAccessor.java:147)
at oracle.jdbc.driver.T4CCharAccessor.getInt(T4CCharAccessor.java:726)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:896)
at com.avaje.ebeaninternal.server.type.RsetDataReader.getInt(RsetDataReader.java:135)
at com.avaje.ebeaninternal.server.type.ScalarTypeInteger.read(ScalarTypeInteger.java:52)
at com.avaje.ebeaninternal.server.type.ScalarTypeInteger.read(ScalarTypeInteger.java:36)
at com.avaje.ebeaninternal.server.deploy.BeanProperty.read(BeanProperty.java:631)
at com.avaje.ebeaninternal.server.deploy.id.IdBinderSimple.read(IdBinderSimple.java:190)
at com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne$Reference.read(BeanPropertyAssocOne.java:729)
at com.avaje.ebeaninternal.server.deploy.BeanPropertyAssocOne.read(BeanPropertyAssocOne.java:549)
at com.avaje.ebeaninternal.server.query.SqlBeanLoad.load(SqlBeanLoad.java:118)
... 36 more

 
Rob 16 Mar 10:28
This is caused by

This is caused by the use of rownum with rawSql via using maxRows and/or firstRow.

For oracle an extra column (rownum) is added to implement the max rows limit and this needs to be taken into account when reading the results from the raw jdbc result.

Rob 16 Mar 11:07
Fixed in HEAD

fixed in HEAD.

woResponse

Upload a file