在hibernate.xml配置中 添加
<prop key="hibernate.connection.SetBigStringTryClob">true</prop>
如:
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_outer_join">true</prop>
<prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</prop>
<prop key="hibernate.connection.pool_size">10</prop>
<prop key="hibernate.jdbc.fetch_size">100</prop>
<prop key="hibernate.connection.SetBigStringTryClob">true</prop>
<prop key="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</prop>
</props>
</property>
在模型映射中对应字段配置成
<property name="svalue" type="text">
<column name="SVALUE" />
</property>
java对应的模型中可以直接用 String svalue,