org.hibernate.exception.JDBCConnectionException: could not execute statement

Hibernate JIRA | Martin Šimka | 4 years ago
  1. 0

    [HHH-8084] LobMergeTest fails on oracle - Hibernate JIRA

    atlassian.net | 12 months ago
    org.hibernate.exception.JDBCConnectionException: could not execute statement
  2. 0

    org.hibernate.test.lob.LobMergeTest.testMergingBlobData entity persist in first commit passes but merge changes in second commit fails Stacktrace: {quote} org.hibernate.exception.JDBCConnectionException: could not execute statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:128) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3215) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3117) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3446) at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1212) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:400) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at org.hibernate.test.lob.LobMergeTest.testMergingBlobData(LobMergeTest.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62) Caused by: java.sql.SQLRecoverableException: Io exception: No more data to read from socket at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:521) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:969) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:125) ... 27 more Caused by: java.io.IOException: No more data to read from socket at oracle.jdbc.driver.DatabaseError.SQLToIOException(DatabaseError.java:814) at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:197) at oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:159) at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:133) at oracle.jdbc.driver.OracleConversionInputStream.needBytesFromStream(OracleConversionInputStream.java:321) at oracle.jdbc.driver.OracleConversionInputStream.needBytes(OracleConversionInputStream.java:200) at oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:159) at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:133) at oracle.jdbc.driver.T4CTTIrxd.marshal(T4CTTIrxd.java:773) at oracle.jdbc.driver.T4C8Oall.marshalBinds(T4C8Oall.java:1794) at oracle.jdbc.driver.T4C8Oall.marshalAll(T4C8Oall.java:1251) at oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:542) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953) ... 32 more {quote} Output: {noformat} ... 07:00:58,803 DEBUG SQL:104 - select max(ID) from LOB_ENTITY 07:00:58,807 DEBUG SQL:104 - insert into LOB_ENTITY (CLOB_DATA, BLOB_DATA, ID) values (?, ?, ?) 07:00:58,837 DEBUG SQL:104 - select lobholder0_.ID as ID0_0_, lobholder0_.CLOB_DATA as CLOB2_0_0_, lobholder0_.BLOB_DATA as BLOB3_0_0_ from LOB_ENTITY lobholder0_ where lobholder0_.ID=? 07:00:58,857 DEBUG SQL:104 - update LOB_ENTITY set CLOB_DATA=?, BLOB_DATA=? where ID=? 07:01:01,342 WARN SqlExceptionHelper:143 - SQL Error: 17002, SQLState: 08006 07:01:01,342 ERROR SqlExceptionHelper:144 - Io exception: No more data to read from socket 07:01:01,342 WARN SqlExceptionHelper:143 - SQL Error: 17008, SQLState: 99999 07:01:01,342 ERROR SqlExceptionHelper:144 - Closed Connection 07:01:01,343 INFO SchemaExport:343 - HHH000227: Running hbm2ddl schema export ... {noformat}

    Hibernate JIRA | 4 years ago | Martin Šimka
    org.hibernate.exception.JDBCConnectionException: could not execute statement
  3. 0

    org.hibernate.test.lob.LobMergeTest.testMergingBlobData entity persist in first commit passes but merge changes in second commit fails Stacktrace: {quote} org.hibernate.exception.JDBCConnectionException: could not execute statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:128) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3215) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3117) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3446) at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1212) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:400) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at org.hibernate.test.lob.LobMergeTest.testMergingBlobData(LobMergeTest.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62) Caused by: java.sql.SQLRecoverableException: Io exception: No more data to read from socket at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:521) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:969) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:125) ... 27 more Caused by: java.io.IOException: No more data to read from socket at oracle.jdbc.driver.DatabaseError.SQLToIOException(DatabaseError.java:814) at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:197) at oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:159) at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:133) at oracle.jdbc.driver.OracleConversionInputStream.needBytesFromStream(OracleConversionInputStream.java:321) at oracle.jdbc.driver.OracleConversionInputStream.needBytes(OracleConversionInputStream.java:200) at oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:159) at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:133) at oracle.jdbc.driver.T4CTTIrxd.marshal(T4CTTIrxd.java:773) at oracle.jdbc.driver.T4C8Oall.marshalBinds(T4C8Oall.java:1794) at oracle.jdbc.driver.T4C8Oall.marshalAll(T4C8Oall.java:1251) at oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:542) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953) ... 32 more {quote} Output: {noformat} ... 07:00:58,803 DEBUG SQL:104 - select max(ID) from LOB_ENTITY 07:00:58,807 DEBUG SQL:104 - insert into LOB_ENTITY (CLOB_DATA, BLOB_DATA, ID) values (?, ?, ?) 07:00:58,837 DEBUG SQL:104 - select lobholder0_.ID as ID0_0_, lobholder0_.CLOB_DATA as CLOB2_0_0_, lobholder0_.BLOB_DATA as BLOB3_0_0_ from LOB_ENTITY lobholder0_ where lobholder0_.ID=? 07:00:58,857 DEBUG SQL:104 - update LOB_ENTITY set CLOB_DATA=?, BLOB_DATA=? where ID=? 07:01:01,342 WARN SqlExceptionHelper:143 - SQL Error: 17002, SQLState: 08006 07:01:01,342 ERROR SqlExceptionHelper:144 - Io exception: No more data to read from socket 07:01:01,342 WARN SqlExceptionHelper:143 - SQL Error: 17008, SQLState: 99999 07:01:01,342 ERROR SqlExceptionHelper:144 - Closed Connection 07:01:01,343 INFO SchemaExport:343 - HHH000227: Running hbm2ddl schema export ... {noformat}

    Hibernate JIRA | 4 years ago | Martin Šimka
    org.hibernate.exception.JDBCConnectionException: could not execute statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 9#67537393

    GitHub | 2 years ago | miguel-vila
    java.sql.SQLRecoverableException: No more data to read from socket

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      No more data to read from socket

      at oracle.jdbc.driver.DatabaseError.SQLToIOException()
    2. Oracle jdbc
      OraclePreparedStatementWrapper.executeUpdate
      1. oracle.jdbc.driver.DatabaseError.SQLToIOException(DatabaseError.java:814)
      2. oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:197)
      3. oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:159)
      4. oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:133)
      5. oracle.jdbc.driver.OracleConversionInputStream.needBytesFromStream(OracleConversionInputStream.java:321)
      6. oracle.jdbc.driver.OracleConversionInputStream.needBytes(OracleConversionInputStream.java:200)
      7. oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:159)
      8. oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:133)
      9. oracle.jdbc.driver.T4CTTIrxd.marshal(T4CTTIrxd.java:773)
      10. oracle.jdbc.driver.T4C8Oall.marshalBinds(T4C8Oall.java:1794)
      11. oracle.jdbc.driver.T4C8Oall.marshalAll(T4C8Oall.java:1251)
      12. oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:542)
      13. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180)
      14. oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:953)
      15. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
      16. oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
      17. oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468)
      18. oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
      18 frames
    3. Hibernate
      AbstractTransactionImpl.commit
      1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:125)
      2. org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
      3. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3215)
      4. org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3117)
      5. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3446)
      6. org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140)
      7. org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
      8. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
      9. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276)
      10. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328)
      11. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
      12. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1212)
      13. org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:400)
      14. org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      15. org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
      15 frames
    4. org.hibernate.test
      LobMergeTest.testMergingBlobData
      1. org.hibernate.test.lob.LobMergeTest.testMergingBlobData(LobMergeTest.java:69)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:601)
      4 frames
    6. JUnit
      FrameworkMethod.invokeExplosively
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      3 frames
    7. A Hibernate O/RM Module
      ExtendedFrameworkMethod.invokeExplosively
      1. org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:63)
      1 frame
    8. JUnit
      FailOnTimeout$StatementThread.run
      1. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      2. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      3. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      4. org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62)
      4 frames