OpenJPA
  1. OpenJPA
  2. OPENJPA-526

Insert text more than 4K bytes to Clob column causes SQLException: Exhausted Resultset

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.0.2, 1.1.0, 1.2.0
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      OpenJPA 1.0.0, 1.0.2
      Oracle XE 10g (JDBC driver 10.2.0.3.0
      JRE 1.5.0_13
    • Patch Info:
      Patch Available

      Description

      Here's the persistence class:
      public class Exam...

      { @Lob @Column(name = "text", nullable = false) ***** NOTE: set nullable = true will fix the problem but it leads to bug OPENJPA-525 ***** private String text; }

      Here are the differences with nullable = true:
      INSERT INTO exam (id, text) VALUES (?, ?) [params=(long) 1, (Clob) oracle.sql.CLOB@d402dd]
      SELECT t0.text FROM exam t0 WHERE t0.id = ? FOR UPDATE [params=(long) 1]
      With nullable = false:
      INSERT INTO exam (id, text) VALUES (?, ?) [params=(long) 1, (Reader) java.io.StringReader@1603522]
      SELECT t0.text FROM exam t0 WHERE t0.id = ? FOR UPDATE [params=(long) 1] [code=1400, state=23000]

      Here's the full stack trace:
      [2008-02-27 10:43:51,232][main][org.apache.openjpa.lib.log.Log4JLogFactory$LogAdapter:72][DEBUG] <t 11050211, conn 32112901> executing prepstmnt 15029693 INSERT INTO exam (id, last_updated_by, comments, sustained_on, text, version, course_id, professor_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 11, (String) test, (null) null, (Date) 2008-02-27, (Reader) java.io.StringReader@da9ea4, (int) 1, (long) 1, (long) 8]
      [2008-02-27 10:43:51,248][main][org.apache.openjpa.lib.log.Log4JLogFactory$LogAdapter:72][DEBUG] <t 11050211, conn 32112901> [16 ms] spent
      [2008-02-27 10:43:51,248][main][org.apache.openjpa.lib.log.Log4JLogFactory$LogAdapter:72][DEBUG] <t 11050211, conn 32112901> executing prepstmnt 24422114 SELECT t0.text FROM exam t0 WHERE t0.id = ? FOR UPDATE [params=(long) 11]
      [2008-02-27 10:43:51,279][main][org.apache.openjpa.lib.log.Log4JLogFactory$LogAdapter:72][DEBUG] <t 11050211, conn 32112901> [31 ms] spent
      [2008-02-27 10:43:51,279][main][org.apache.openjpa.lib.log.Log4JLogFactory$LogAdapter:76][DEBUG] An exception occurred while ending the transaction. This exception will be re-thrown.
      <openjpa-1.0.2-r420667:627158 fatal store error> org.apache.openjpa.util.StoreException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
      at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2108)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1853)
      at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1771)
      at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
      at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1293)
      at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:861)
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:408)
      at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:438)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:662)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:319)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
      at com.intellapps.university.service.impl.ServiceDahImpl$$EnhancerByCGLIB$$81ecf35d.insertExam(<generated>)
      at com.intellapps.university.service.impl.ServiceImpl.insertExam(ServiceImpl.java:98)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at $Proxy17.insertExam(Unknown Source)
      at com.intellapps.university.app.Main.testInsertExamWithLongText(Main.java:103)
      at com.intellapps.university.app.Main.main(Main.java:203)
      Caused by: <openjpa-1.0.2-r420667:627158 nonfatal store error> org.apache.openjpa.util.StoreException: Exhausted Resultset
      at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3946)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:97)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:83)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:59)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:96)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
      at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      ... 29 more
      Caused by: java.sql.SQLException: Exhausted Resultset
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
      at oracle.jdbc.driver.ScrollableResultSet.getOracleObject(ScrollableResultSet.java:510)
      at oracle.jdbc.driver.ScrollableResultSet.getCLOB(ScrollableResultSet.java:1446)
      at oracle.jdbc.driver.UpdatableResultSet.getCLOB(UpdatableResultSet.java:1639)
      at oracle.jdbc.driver.UpdatableResultSet.getClob(UpdatableResultSet.java:982)
      at org.apache.commons.dbcp.DelegatingResultSet.getClob(DelegatingResultSet.java:515)
      at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getClob(DelegatingResultSet.java:576)
      at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedClobFieldStrategy.putData(MaxEmbeddedClobFieldStrategy.java:69)
      at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedLobFieldStrategy.customUpdate(MaxEmbeddedLobFieldStrategy.java:162)
      at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedLobFieldStrategy.customInsert(MaxEmbeddedLobFieldStrategy.java:140)
      at org.apache.openjpa.jdbc.meta.FieldMapping.customInsert(FieldMapping.java:684)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager$CustomMapping.execute(AbstractUpdateManager.java:358)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:94)
      ... 32 more
      NestedThrowables:
      <openjpa-1.0.2-r420667:627158 nonfatal store error> org.apache.openjpa.util.ReferentialIntegrityException: ORA-01400: cannot insert NULL into ("TEST"."EXAM"."TEXT")

      {prepstmnt 15029693 INSERT INTO exam (id, last_updated_by, comments, sustained_on, text, version, course_id, professor_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 11, (String) test, (null) null, (Date) 2008-02-27, (Reader) java.io.StringReader@da9ea4, (int) 1, (long) 1, (long) 8]} [code=1400, state=23000]
      FailedObject: com.intellapps.university.core.model.Exam@1417690
      at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3944)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:97)
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:67)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:108)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:73)
      at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flushPrimaryRow(OperationOrderUpdateManager.java:203)
      at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:89)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
      at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1853)
      at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1771)
      at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
      at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1293)
      at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:861)
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:408)
      at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:438)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:662)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:319)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
      at com.intellapps.university.service.impl.ServiceDahImpl$$EnhancerByCGLIB$$81ecf35d.insertExam(<generated>)
      at com.intellapps.university.service.impl.ServiceImpl.insertExam(ServiceImpl.java:98)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at $Proxy17.insertExam(Unknown Source)
      at com.intellapps.university.app.Main.testInsertExamWithLongText(Main.java:103)
      at com.intellapps.university.app.Main.main(Main.java:203)
      Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-01400: cannot insert NULL into ("TEST"."EXAM"."TEXT")
      {prepstmnt 15029693 INSERT INTO exam (id, last_updated_by, comments, sustained_on, text, version, course_id, professor_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 11, (String) test, (null) null, (Date) 2008-02-27, (Reader) java.io.StringReader@da9ea4, (int) 1, (long) 1, (long) 8]}

      [code=1400, state=23000]
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:57)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:858)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:97)
      ... 36 more
      NestedThrowables:
      java.sql.SQLException: ORA-01400: cannot insert NULL into ("TEST"."EXAM"."TEXT")

      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
      at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3423)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:856)
      at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:97)
      at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:73)
      at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flushPrimaryRow(OperationOrderUpdateManager.java:203)
      at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flush(OperationOrderUpdateManager.java:89)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)
      at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:514)
      at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
      at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1955)
      at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1853)
      at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1771)
      at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
      at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1293)
      at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:861)
      at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:408)
      at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:438)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:662)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:319)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
      at com.intellapps.university.service.impl.ServiceDahImpl$$EnhancerByCGLIB$$81ecf35d.insertExam(<generated>)
      at com.intellapps.university.service.impl.ServiceImpl.insertExam(ServiceImpl.java:98)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at $Proxy17.insertExam(Unknown Source)
      at com.intellapps.university.app.Main.testInsertExamWithLongText(Main.java:103)
      at com.intellapps.university.app.Main.main(Main.java:203)

        Activity

        Frank Le created issue -
        Hide
        Eric Phetteplace added a comment -

        It works fine with the BLOB is below the MaxEmbeddedBlobSize. Here is a sample of the jpa trace when it is above the max size:

        Notice how the "SELECT ... FOR UPDATE" query does not have the proper values. It is passing 0, 0 instead of 1, 30061

        13797 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> executing prepstmnt 27999450 INSERT INTO SURVEY.QUESTION_RESULTS_COMMENTS (QUESTIONID, SURVEYRESULTSID, COMMENT_, soundfile) VALUES (?, ?, ?, ?) [params=(long) 1, (long) 30061, (String) x, (Blob) oracle.sql.BLOB@20224a]

        13797 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> [0 ms] spent

        13813 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> executing prepstmnt 19413030 INSERT INTO SURVEY.QUESTION_RESULTS (QUESTIONID, SURVEYRESULTSID, answer) VALUES (?, ?, ?) [params=(long) 1, (long) 30061, (int) 1]

        13813 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> [0 ms] spent

        13813 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> executing prepstmnt 6223775 SELECT t0.soundfile FROM SURVEY.QUESTION_RESULTS_COMMENTS t0 WHERE t0.QUESTIONID = ? AND t0.SURVEYRESULTSID = ? FOR UPDATE [params=(long) 0, (long) 0]

        13875 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> [62 ms] spent

        13891 SurveyDB TRACE [main] openjpa.Runtime - An exception occurred while ending the transaction. This exception will be re-thrown.

        Show
        Eric Phetteplace added a comment - It works fine with the BLOB is below the MaxEmbeddedBlobSize. Here is a sample of the jpa trace when it is above the max size: Notice how the "SELECT ... FOR UPDATE" query does not have the proper values. It is passing 0, 0 instead of 1, 30061 13797 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> executing prepstmnt 27999450 INSERT INTO SURVEY.QUESTION_RESULTS_COMMENTS (QUESTIONID, SURVEYRESULTSID, COMMENT_, soundfile) VALUES (?, ?, ?, ?) [params=(long) 1, (long) 30061, (String) x, (Blob) oracle.sql.BLOB@20224a] 13797 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> [0 ms] spent 13813 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> executing prepstmnt 19413030 INSERT INTO SURVEY.QUESTION_RESULTS (QUESTIONID, SURVEYRESULTSID, answer) VALUES (?, ?, ?) [params=(long) 1, (long) 30061, (int) 1] 13813 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> [0 ms] spent 13813 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> executing prepstmnt 6223775 SELECT t0.soundfile FROM SURVEY.QUESTION_RESULTS_COMMENTS t0 WHERE t0.QUESTIONID = ? AND t0.SURVEYRESULTSID = ? FOR UPDATE [params=(long) 0, (long) 0] 13875 SurveyDB TRACE [main] openjpa.jdbc.SQL - <t 12684953, conn 0> [62 ms] spent 13891 SurveyDB TRACE [main] openjpa.Runtime - An exception occurred while ending the transaction. This exception will be re-thrown.
        Eric Phetteplace made changes -
        Field Original Value New Value
        Affects Version/s 1.2.0 [ 12313102 ]
        Affects Version/s 1.1.0 [ 12312344 ]
        Hide
        Catalina Wei added a comment -

        Eric,
        The clob/blob size limit is set in OracleDictionary as:
        maxEmbeddedBlobSize = 4000;
        maxEmbeddedClobSize = 4000;

        Do you know if any Oracle release has the above limits ?
        If there is no such limit, then the above 2 lines of code should be removed.

        You could workaround the problem by adding the following property in your persistece.xml:

        <property name="openjpa.jdbc.DBDictionary" value="oracle(maxEmbeddedBlobSize=-1,maxEmbeddedClobSize=-1)"/>

        Please give it a try.

        Show
        Catalina Wei added a comment - Eric, The clob/blob size limit is set in OracleDictionary as: maxEmbeddedBlobSize = 4000; maxEmbeddedClobSize = 4000; Do you know if any Oracle release has the above limits ? If there is no such limit, then the above 2 lines of code should be removed. You could workaround the problem by adding the following property in your persistece.xml: <property name="openjpa.jdbc.DBDictionary" value="oracle(maxEmbeddedBlobSize=-1,maxEmbeddedClobSize=-1)"/> Please give it a try.
        Hide
        B.J. Reed added a comment -

        The code that is changed fixes 2 Oracle test problems with non nullable Clobs:

        1. When the string is too large to fit in the Oracle Clob normally, an empty string gets passed into the setClobString method. This was causing the exception noted in this JIRA.
        2. When the user wants to set the Clob to an empty string, the empty string gets passed into setClobString. OpenJPA would try to set the non nullable field to null.

        Also included is a test case. Lobs.java was not being used for any other tests, it looks like it was leftover from something else.

        http://issues.apache.org/jira/browse/OPENJPA-525 is NOT fixed yet with this change, even though it is closely related.

        Show
        B.J. Reed added a comment - The code that is changed fixes 2 Oracle test problems with non nullable Clobs: 1. When the string is too large to fit in the Oracle Clob normally, an empty string gets passed into the setClobString method. This was causing the exception noted in this JIRA. 2. When the user wants to set the Clob to an empty string, the empty string gets passed into setClobString. OpenJPA would try to set the non nullable field to null. Also included is a test case. Lobs.java was not being used for any other tests, it looks like it was leftover from something else. http://issues.apache.org/jira/browse/OPENJPA-525 is NOT fixed yet with this change, even though it is closely related.
        B.J. Reed made changes -
        Attachment OPENJPA-526.patch [ 12402303 ]
        Hide
        Georgi Naplatanov added a comment -

        Hello Frank. Do you can confirm this issue ?

        I tested with BLOB field up to 8MB without problems with OpenJPA 1.2.1.

        I use Oracle 11g JDBC thin driver which is compatible with 9iR2 and 10g servers.

        It's is my field definition :

        @Column(nullable=false)
        byte[] binaryField ;

        I set the following property :

        <property name="openjpa.jdbc.DBDictionary" value="oracle(maxEmbeddedBlobSize=-1,maxEmbeddedClobSize=-1)"/>

        Show
        Georgi Naplatanov added a comment - Hello Frank. Do you can confirm this issue ? I tested with BLOB field up to 8MB without problems with OpenJPA 1.2.1. I use Oracle 11g JDBC thin driver which is compatible with 9iR2 and 10g servers. It's is my field definition : @Column(nullable=false) byte[] binaryField ; I set the following property : <property name="openjpa.jdbc.DBDictionary" value="oracle(maxEmbeddedBlobSize=-1,maxEmbeddedClobSize=-1)"/>
        B.J. Reed made changes -
        Patch Info [Patch Available]
        Hide
        gaurav joshi added a comment -

        Hello,

        I am getting the same exception, I am using Oracle 9.2 with OpenJPA 1.2.1 (even tested with 1.2.2 ver). My field definition is
        @Lob
        @Column(name="LAYOUT_XML")
        private byte[] layoutXml; AND

        @Lob
        @Column(name="SCENARIO_XML")
        private byte[] scenarioXml;

        I have even checked with both nullable false and true. and even have set the
        <property name="openjpa.jdbc.DBDictionary" value="oracle(maxEmbeddedBlobSize=-1,maxEmbeddedClobSize=-1)"/> as well.

        The column at the DB are of type blob and I get the following exception

        org.jboss.resteasy.spi.UnhandledException: <openjpa-1.2.2-r422266:898935 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
        at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:296)
        at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:208)
        at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:187)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:371)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:160)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:113)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:69)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1121)
        at com.iontrading.common.license.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:31)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112)
        at com.iontrading.common.util.NoCacheFilter.doFilter(NoCacheFilter.java:42)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
        at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.ui.digestauth.DigestProcessingFilter.doFilter(DigestProcessingFilter.java:328)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
        at org.mortbay.jetty.security.ConstraintsSecurityHandler.handle(ConstraintsSecurityHandler.java:220)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:305)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:550)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:890)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:743)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:215)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:407)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:421)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
        Caused by: <openjpa-1.2.2-r422266:898935 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
        at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2187)
        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2029)
        at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1927)
        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1698)
        at org.apache.openjpa.kernel.DelegatingBroker.flush(DelegatingBroker.java:989)
        at org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:592)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:198)
        at $Proxy21.flush(Unknown Source)
        at com.iontrading.common.plugins.workspaces.dao.WorkspaceDAOImpl.saveObject(WorkspaceDAOImpl.java:58)
        at com.iontrading.common.plugins.workspaces.dao.WorkspaceDAOImpl$$FastClassByCGLIB$$9bd19fe0.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
        at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
        at com.iontrading.common.plugins.workspaces.dao.WorkspaceDAOImpl$$EnhancerByCGLIB$$61498ea4.saveObject(<generated>)
        at com.iontrading.common.plugins.workspaces.service.impl.WorkspaceServiceImpl.addWorkspace(WorkspaceServiceImpl.java:57)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:119)
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:211)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:176)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
        ... 41 more
        Caused by: <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Exhausted Resultset
        at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4246)
        at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4211)
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
        at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:96)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:721)
        at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
        ... 73 more
        Caused by: java.sql.SQLException: Exhausted Resultset
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
        at oracle.jdbc.driver.ScrollableResultSet.getOracleObject(ScrollableResultSet.java:510)
        at oracle.jdbc.driver.ScrollableResultSet.getBLOB(ScrollableResultSet.java:1425)
        at oracle.jdbc.driver.UpdatableResultSet.getBLOB(UpdatableResultSet.java:1609)
        at oracle.jdbc.driver.UpdatableResultSet.getBlob(UpdatableResultSet.java:976)
        at org.apache.commons.dbcp.DelegatingResultSet.getBlob(DelegatingResultSet.java:512)
        at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getBlob(DelegatingResultSet.java:580)
        at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedByteArrayFieldStrategy.putData(MaxEmbeddedByteArrayFieldStrategy.java:75)
        at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedLobFieldStrategy.customUpdate(MaxEmbeddedLobFieldStrategy.java:162)
        at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedLobFieldStrategy.customInsert(MaxEmbeddedLobFieldStrategy.java:140)
        at org.apache.openjpa.jdbc.meta.FieldMapping.customInsert(FieldMapping.java:701)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager$CustomMapping.execute(AbstractUpdateManager.java:375)
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:94)

        Show
        gaurav joshi added a comment - Hello, I am getting the same exception, I am using Oracle 9.2 with OpenJPA 1.2.1 (even tested with 1.2.2 ver). My field definition is @Lob @Column(name="LAYOUT_XML") private byte[] layoutXml; AND @Lob @Column(name="SCENARIO_XML") private byte[] scenarioXml; I have even checked with both nullable false and true. and even have set the <property name="openjpa.jdbc.DBDictionary" value="oracle(maxEmbeddedBlobSize=-1,maxEmbeddedClobSize=-1)"/> as well. The column at the DB are of type blob and I get the following exception org.jboss.resteasy.spi.UnhandledException: <openjpa-1.2.2-r422266:898935 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:296) at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:208) at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:187) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:371) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:160) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:113) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1121) at com.iontrading.common.license.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:31) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at com.iontrading.common.util.NoCacheFilter.doFilter(NoCacheFilter.java:42) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.digestauth.DigestProcessingFilter.doFilter(DigestProcessingFilter.java:328) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.mortbay.jetty.security.ConstraintsSecurityHandler.handle(ConstraintsSecurityHandler.java:220) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:305) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:550) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:890) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:743) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:215) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:407) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:421) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: <openjpa-1.2.2-r422266:898935 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2187) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2029) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1927) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1698) at org.apache.openjpa.kernel.DelegatingBroker.flush(DelegatingBroker.java:989) at org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:592) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:198) at $Proxy21.flush(Unknown Source) at com.iontrading.common.plugins.workspaces.dao.WorkspaceDAOImpl.saveObject(WorkspaceDAOImpl.java:58) at com.iontrading.common.plugins.workspaces.dao.WorkspaceDAOImpl$$FastClassByCGLIB$$9bd19fe0.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at com.iontrading.common.plugins.workspaces.dao.WorkspaceDAOImpl$$EnhancerByCGLIB$$61498ea4.saveObject(<generated>) at com.iontrading.common.plugins.workspaces.service.impl.WorkspaceServiceImpl.addWorkspace(WorkspaceServiceImpl.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:119) at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:211) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:176) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) ... 41 more Caused by: <openjpa-1.2.2-r422266:898935 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Exhausted Resultset at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4246) at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4211) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:96) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:721) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130) ... 73 more Caused by: java.sql.SQLException: Exhausted Resultset at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208) at oracle.jdbc.driver.ScrollableResultSet.getOracleObject(ScrollableResultSet.java:510) at oracle.jdbc.driver.ScrollableResultSet.getBLOB(ScrollableResultSet.java:1425) at oracle.jdbc.driver.UpdatableResultSet.getBLOB(UpdatableResultSet.java:1609) at oracle.jdbc.driver.UpdatableResultSet.getBlob(UpdatableResultSet.java:976) at org.apache.commons.dbcp.DelegatingResultSet.getBlob(DelegatingResultSet.java:512) at org.apache.openjpa.lib.jdbc.DelegatingResultSet.getBlob(DelegatingResultSet.java:580) at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedByteArrayFieldStrategy.putData(MaxEmbeddedByteArrayFieldStrategy.java:75) at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedLobFieldStrategy.customUpdate(MaxEmbeddedLobFieldStrategy.java:162) at org.apache.openjpa.jdbc.meta.strats.MaxEmbeddedLobFieldStrategy.customInsert(MaxEmbeddedLobFieldStrategy.java:140) at org.apache.openjpa.jdbc.meta.FieldMapping.customInsert(FieldMapping.java:701) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager$CustomMapping.execute(AbstractUpdateManager.java:375) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:94)
        Catalina Wei made changes -
        Assignee Catalina Wei [ fancy ]
        Catalina Wei committed 987644 (1 file)
        Reviews: none

        OPENJPA-526: Insert text more than 4K bytes to Clob column causes SQLException: Exhausted Resultset
        fix table name in Lobs entity to avoid conflict with other entities in JUnit regression.

        Hide
        Catalina Wei added a comment -

        committed fix at revision 987598

        Show
        Catalina Wei added a comment - committed fix at revision 987598
        Catalina Wei made changes -
        Fix Version/s 2.1.0 [ 12314542 ]
        Michael Dick committed 988220 (1 file)
        Hide
        Donald Woods added a comment -

        code committed to trunk 30 days ago. reopen if more work is needed.

        Show
        Donald Woods added a comment - code committed to trunk 30 days ago. reopen if more work is needed.
        Donald Woods made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Michael Dick added a comment -

        Closing issue which has been resolved for some time. If you believe the issue is not resolved please reopen or open a new issue.

        Show
        Michael Dick added a comment - Closing issue which has been resolved for some time. If you believe the issue is not resolved please reopen or open a new issue.
        Michael Dick made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Catalina Wei
            Reporter:
            Frank Le
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development