Hi All,
I am first time inserting the clob type using hibernate ..here i am facing some issue with clob type..details follows. pls suggest
Hibernate version: 3
Mapping documents
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="......................PositionHeader" lazy="false" table="POSITION_HEADER" schema="....." >
<cache usage="read-write"/>
<id column="ID" name="id" type="long">
<generator class="sequence">
<param name="sequence">.....POSITION_HEADER_SEQ</param>
</generator>
</id>
<property name="description" column="DESCRIPTION" />
<property name="valid_Till" column="VALID_TILL" />
<property name="upload_Date" column="UPLOAD_DATE" />
<property name="uploaded_By" column="UPLOADED_BY" />
<property name="rds_L2_Id" column="RDS_L2_ID" />
<property name="attatchedfile" column="ATTACHEDFILE" type="java.sql.Clob" />
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs[..........................................ClientPositionProcessor][main]
java.lang.UnsupportedOperationException: Clobs are not cacheable
at org.hibernate.type.ClobType.disassemble(ClobType.java:84)
at org.hibernate.type.TypeFactory.disassemble(TypeFactory.java:416)
at org.hibernate.cache.entry.CacheEntry.<init>(CacheEntry.java:46)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:74)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at ...........................................ClientPositionProcessor.process(ClientPositionProcessor.java:71)
at ...........................................CPTeset.main(CPTeset.java:53)
Name and version of the database you are using:Oracle 10g
Read this:
http://hibernate.org/42.html