We are facing below exception while fetching the CLOB from the database.
Closed Connection: java.sql.SQLRecoverableException: Closed Connection
at oracle.sql.CLOB.getDBAccess(CLOB.java:1510) [ojdbc6.jar:11.2.0.3.0]
at oracle.sql.CLOB.getCharacterStream(CLOB.java:361) [ojdbc6.jar:11.2.0.3.0]
We are getting this exception only fetching the CLOB from the database and this is really very random.
We are using jboss7.0.2 with ojdbc6.jar for oracle 11.2.0.3 and ironjacamar-jdbc-1.0.9.final.jar
standalone.xml configuration is as follows
<driver>
ojdbc6
</driver>
<pool>
<max-pool-size>
25
</max-pool-size>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<security-domain>
TestDSRealm
</security-domain>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
<validate-on-match>
false
</validate-on-match>
<background-validation>
false
</background-validation>
<use-fast-fail>
false
</use-fast-fail>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
</validation>
<statement>
<prepared-statement-cache-size>
100
</prepared-statement-cache-size>
</statement>
Are we doing anything wrong here? Any idea?
Thanks for your help..
Thanks,
I changed the mapping from Clob to String ( Loading Clob data as a String (eager) via Hibernate's org.hibernate.Query ) and after all worked.