LobMergeTest fails on oracle

Description

org.hibernate.test.lob.LobMergeTest.testMergingBlobData

entity persist in first commit passes but merge changes in second commit fails

Stacktrace:

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

Output:

Environment

oracle11gR1, oracle11gR1RAC, oracle11gR2, oracle11gR2RAC

Activity

Show:
Brett Meyer
March 25, 2013, 6:32 PM

This is the stacktrace I get locally:

https://gist.github.com/brmeyer/585f591807bad32fab42

Brett Meyer
March 25, 2013, 6:34 PM

Occurs in this commit:

, I'm not very familiar with the LobHelper. Could there be an issue with the logic causing getBytes and setBytes to conflict with each other? Otherwise, does this test simply need skipped for Oracle?

Brett Meyer
April 9, 2013, 5:02 PM

, at one point we discussed this on IRC and you mentioned considering switching to NonContextualLobCreator for all lob wrapping/creating. What do you think?

Brett Meyer
April 9, 2013, 10:54 PM
Edited

(06:53:14 PM) sebersole: i'd like to see if that helps
(06:53:46 PM) sebersole: be sure to only do it on the "consumer side"
(06:54:06 PM) sebersole: not within the "binding context" or whatever i called it
(06:54:48 PM) sebersole: WrapperOptions

Fixed

Assignee

Brett Meyer

Reporter

Martin Simka

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure