修改实体类中Clob对象为String ,修改hbm.xml文件中
<property name="content" type="java.sql.Clob" column="CONTENT" not-null="false"/>
为
<property name="content" type="text"> <column name="CONTENT" /> </property>
在applicationContext.xml中加入
<property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.Oracle10gDialect </prop> <prop key="hibernate.show_sql">false</prop> <prop key="hibernate.format_sql">false</prop> <prop key="hibernate.cache.use_query_cache">false</prop> <prop key="hibernate.generate_statistics">false</prop> <prop key="hibernate.jdbc.fetch_size">50</prop> <prop key="hibernate.jdbc.batch_size">30</prop> <prop key="hibernate.connection.SetBigStringTryClob">true</prop> </props> </property>
更新ojdbc12.jar为10g版本
便可将clob对象当做普通String进行操作。