[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5659) Problem using Hibernate3.6.0.Final with BLOB and CLOB fields in Oracle.
Vincent Massol (JIRA)
noreply at atlassian.com
Fri Jan 13 05:00:10 EST 2012
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45126#comment-45126 ]
Vincent Massol commented on HHH-5659:
-------------------------------------
Guys I'm still seeing the problem too, i.e.
{noformat}
Wrapped Exception: $Proxy61 cannot be cast to oracle.sql.CLOB
{noformat}
Here's my setup:
* Oracle 10g 10.2.0.1.0, JDBC Driver: ojdbc14-10.2.0.2
* hibernate.cfg.xml: <property name="jdbc.use_streams_for_binary">true</property>
* Hibernate 3.6.8
The only workaround I have found is to add the following in my mapping file:
<typedef name="materialized_clob" class="org.hibernate.type.StringClobType" />
>From reading the above I was expecting this to be fixed in Hibernate 3.6.1. Isn't that the case?
Since StringClobType is deprecated I was hoping to find a better solution. Any idea?
Thanks a lot
> Problem using Hibernate3.6.0.Final with BLOB and CLOB fields in Oracle.
> -----------------------------------------------------------------------
>
> Key: HHH-5659
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5659
> Project: Hibernate ORM
> 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
> Assignee: Gail Badner
> Priority: Minor
> Fix For: 3.6.1
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list