Issue Type: Bug Bug
Affects Versions: 4.1.9
Assignee: Unassigned
Components: core
Created: 21/Dec/12 8:29 AM
Description:

When using @Lob on a String-typed attribute, with a column of type text in database, I get this while fetching data (the french exception message says something like "the SybResultSet.getClob(String) method is not supported and should not have been called."):

java.lang.UnsupportedOperationException: La méthode com.sybase.jdbc4.jdbc.SybResultSet.getClob(String) n'est pas supportée et n'aurait pas dû être appelée.
	at com.sybase.jdbc4.jdbc.ErrorMessage.raiseRuntimeException(Unknown Source) ~[jconn4.jar:na]
	at com.sybase.jdbc4.utils.Debug.notSupported(Unknown Source) ~[jconn4.jar:na]
	at com.sybase.jdbc4.jdbc.SybResultSet.getClob(Unknown Source) ~[jconn4.jar:na]
	at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:568) ~[tomcat-dbcp.jar:7.0.14]
	at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:568) ~[tomcat-dbcp.jar:7.0.14]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_30]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_30]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_30]
	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_30]
	at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:104) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at $Proxy128.getClob(Unknown Source) ~[na:na]
	at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$4.doExtract(ClobTypeDescriptor.java:108) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:65) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:332) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]
	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2873) ~[hibernate-core-4.1.9.Final.jar:4.1.9.Final]

Note: I'm currently migrating from Hibernate 3.5.3-Final to 4.1.9.Final, and everything was working fine before the upgrade. Migration guides didn't tell much about LOBs, so I changed nothing @Lob-related in my code/mapping.

As the HibernateCoreMigrationGuide36 wiki page suggested for other database systems, I tried leveraging the hibernate.jdbc.use_streams_for_binary configuration parameter, but to no avail.

This issue may be related to HHH-3691 or HHH-3892.

Environment: Hibernate 4.1.9.Final
Sybase ASE 15.5 (driver: jConnect)
Project: Hibernate ORM
Labels: hibernate core sybase
Priority: Major Major
Reporter: Vincent Cornet
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira