[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5659) Problem using Hibernate3.6.0.Final with CLOB field in Oracle.

David Linsey (JIRA) noreply at atlassian.com
Thu Jan 13 17:08:05 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39609#action_39609 ] 

David Linsey commented on HHH-5659:
-----------------------------------

I'm having a similar problem, but have some different variables.

Just upgraded from 3.1.3 to 3.6.0.  Hibernate is configured to use the Oracle9Dialect, although we're on Oracle 10g (I did try the 10g dialect and it had no difference).  JVM is 1.5.  Getting below exception on the SQL flush using the depricated Hibernate.createClob operation.  I switched to lob helper and get the exact same error.  I've fiddled with the use_streams_for_binary setting both to true and false and it doesn't seem to help.  We're still using the old hbm.xml file configurations for the persistent objects, no annotations, so I'm not quite sure how or if I can try the StringClobType workaround (I tried changing the type attribute in the hbm.xml file to be this and keeping the java type in the class as java.sql.Clob, but that gives a ClassCastException).

java.sql.SQLException: setClob, Exception = $Proxy59
	at weblogic.jdbc.wrapper.JDBCWrapperImpl.invocationExceptionHandler(JDBCWrapperImpl.java:141)
	at weblogic.jdbc.wrapper.PreparedStatement.setClob(PreparedStatement.java:386)
	at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$1.doBind(ClobTypeDescriptor.java:60)
	...
2011-01-13 15:53:05,234 WARN  [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
2011-01-13 15:53:05,234 ERROR [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.hibernate.util.JDBCExceptionReporter - setClob, Exception = $Proxy59

> Problem using Hibernate3.6.0.Final with CLOB field in Oracle.
> -------------------------------------------------------------
>
>                 Key: HHH-5659
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5659
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.0
>         Environment: Hibernate 3.6.0.Final, Database Oracle10G on Linux X64, and JPA
>            Reporter: Samuel Rettore
>            Priority: Minor
>             Fix For: 3.6.1, 4.0.0.Alpha1
>
>         Attachments: createClob_Deprecated.png, Hibernate_createClob_Deprecated.png, LobHelper_Interface.png, Srhlog.java
>
>
> When migrating my project that works well with Hibernate 3.5.6 End-to 3.6.0.Final the Clob field displays the following error 
> |java.lang.ClassCastException: $Proxy1119 cannot be cast to oracle.sql.CLOB
>         at oracle.jdbc.driver.OraclePreparedStatement.setClob(OraclePreparedStatement.java:7021)
>         at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$1.doBind(ClobTypeDescriptor.java:60)
>         at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:89)
>         at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:282)
>         at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:277)
>         at org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:85)
>         at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2166)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2412)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2856)
>         at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
>         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
>         at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
>         at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
>         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
>         at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:795)
>         at com.sun.enterprise.container.common.impl.EntityManagerWrapper.flush(EntityManagerWrapper.java:407)
> ---
> This error appears only with CLOB field.
> to get more information at their disposal.
> Thanks
> Rettore.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list