-
Bug
-
Resolution: Done
-
Major
-
6.4.0.GA, 7.0.0.GA, 7.1.0.GA, 7.2.9.GA, 7.3.6.GA
-
None
-
False
-
False
-
-
-
-
-
-
+
-
Undefined
-
https://gitlab.cee.redhat.com/hibernate/hibernate-orm/-/commit/5d8a48cef341e8b325b69383fa01c5c0c1ca747f, https://gitlab.cee.redhat.com/hibernate/hibernate-orm/-/commit/8dbf7edbf123b8a0a495c5d2179274a3eb5fe1c6, https://gitlab.cee.redhat.com/hibernate/hibernate-orm/-/commit/665786684e9253050be9e0f3f64bda657bbeb15e, https://gitlab.cee.redhat.com/hibernate/hibernate-orm/-/commit/569ece6f1170dc83909da970b2c721d5667d4686
-
When a query is executed setting lock mode to LockModeType.OPTIMISTIC and hibernate.globally_quoted_identifiers is true flush/commit fails with an exception.
... org.hibernate.exception.GenericJDBCException: could not retrieve version: [<ENTITY_PACKAGE.ENTITY_CLASS>#<IDENTIFIER>] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.persister.entity.AbstractEntityPersister.getCurrentVersion(AbstractEntityPersister.java:1899) at org.hibernate.action.internal.EntityVerifyVersionProcess.doBeforeTransactionCompletion(EntityVerifyVersionProcess.java:43) at org.hibernate.engine.spi.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion(ActionQueue.java:954) at org.hibernate.engine.spi.ActionQueue.beforeTransactionCompletion(ActionQueue.java:525) at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2507) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:447) ... Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The column name [<NAME_OF_VERSION_PROPERTY_HERE>] is not valid. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.findColumn(SQLServerResultSet.java:699) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getLong(SQLServerResultSet.java:2353) at org.hibernate.type.descriptor.sql.BigIntTypeDescriptor.doExtract(BigIntTypeDescriptor.java:63) at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249) at org.hibernate.persister.entity.AbstractEntityPersister.getCurrentVersion(AbstractEntityPersister.java:1887) ...
A similar symptom may be observed with multiple database types (e.g. SQL Server, Oracle, H2 ...)
- clones
-
JBEAP-21975 [GSS](7.4.z) HHH-14616 Optimistic Lock throws "could not retrieve version" exception
- Closed
- cloned from
-
HHH-14616 Loading...
- links to