Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate > CLOB > Oracle :(
    primarykey
    data
    text
    <p>I am trying to write to an Oracle clob field a value over 4000 characters. This seams to be a common issue but non of the solutions seem to work. So I pray for help from here.</p> <p>Down and dirty info:<br> Using Oracle 9.2.0.8.0<br> Hibernate3 implementing pojo's with annotations<br> Tomcat 6.0.16<br> Oracle 10.2.x drivers<br> C3P0 connction pool provider </p> <p>In my persistence.xml I have:</p> <pre><code>&lt;persistence-unit name="DWEB" transaction-type="RESOURCE_LOCAL"&gt; &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt; &lt;properties&gt; &lt;property name="hibernate.archive.autodetection" value="class"/&gt; &lt;property name="hibernate.connection.password" value="###" /&gt; &lt;property name="hibernate.connection.username" value="###" /&gt; &lt;property name="hibernate.default_schema" value="schema" /&gt; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" /&gt; &lt;property name="hibernate.c3p0.min_size" value="5" /&gt; &lt;property name="hibernate.c3p0.max_size" value="20" /&gt; &lt;property name="hibernate.c3p0.timeout" value="300" /&gt; &lt;property name="hibernate.c3p0.max_statements" value="50" /&gt; &lt;property name="hibernate.c3p0.idle_test_period" value="3000" /&gt; &lt;property name="show_sql" value="true" /&gt; &lt;property name="format_sql" value="true" /&gt; &lt;property name="use_sql_comments" value="true" /&gt; &lt;property name="SetBigStringTryClob" value="true"/&gt; &lt;property name="hibernate.jdbc.batch_size" value="0"/&gt; &lt;property name="hibernate.connection.url" value="jdbc:oracle:thin:@server.ss.com:1521:DDD"/&gt; &lt;property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/&gt; &lt;/properties&gt; &lt;/persistence-unit&gt; </code></pre> <p>The getter and setter looks like:</p> <pre><code>@Lob @Column(name="COMMENT_DOC") public String getDocument(){ return get("Document"); } public void setDocument(String s){ put("Document",s); } </code></pre> <p>The exception I am getting is:</p> <pre><code>SEVERE: Servlet.service() for servlet SW threw exception java.sql.SQLException: Io exception: Software caused connection abort: socket write error at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334) at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1999) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2275) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027) at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:304) at org.sw.website.actions.content.AddComment.performAction(AddComment.java:60) ... </code></pre> <p>If I need to give more info pleas ask. Everything works until the dreaded limit is exceeded.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload