Hi,
we are facing issues when updating to hibernate-core >= 5.4.24. By bisecting we identified that the problematic changes were introduced during fixing (HHH-14312). This fix was finished by 61dcb7dcd43dc1d2326911bdb11a52c54c6452b8
Unfortunately, we have not been able to boil things down to a very narrow reproducing test case. And what’s worst: Concurrency seems to be a problem. We can reproduce the erroneous behaviour quite easily when using multiple threads, never when running single threaded.
The error looks as follows. Do you have any hints what might be wrong? A lot of changes in the context of DynamicBatching which we are using were made while fixing HHH-14312. So it might be a bug as well.
Any hints for further steps for narrowing down the problem are appreciated.
Best regards, Jens
Exception:
org.hibernate.exception.GenericJDBCException: could not extract ResultSet
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:67) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getResultSet(AbstractLoadPlanBasedLoader.java:390) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeQueryStatement(AbstractLoadPlanBasedLoader.java:163) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:104) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.loadEntityBatch(AbstractLoadPlanBasedEntityLoader.java:233) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.loader.entity.plan.DynamicBatchingEntityLoader.load(DynamicBatchingEntityLoader.java:72) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.doLoad(AbstractEntityPersister.java:4441) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4431) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:569) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:537) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:208) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:103) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:74) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:113) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1186) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.internal.SessionImpl.immediateLoad(SessionImpl.java:1005) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:179) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:310) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
at [AND HERE OUR OWN CODE BEGINS]
...
Caused by: java.sql.SQLException: Fehlender IN- oder OUT-Parameter auf Index:: 5
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1937) ~[ojdbc8.jar!/:19.8.0.0.0]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3657) ~[ojdbc8.jar!/:19.8.0.0.0]
at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426) ~[ojdbc8.jar!/:19.8.0.0.0]
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3713) ~[ojdbc8.jar!/:19.8.0.0.0]
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1167) ~[ojdbc8.jar!/:19.8.0.0.0]
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504) ~[?:?]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57) ~[hibernate-core-5.4.24.Final.jar:5.4.24.Final]
... 474 more