-
Bug
-
Resolution: Done
-
Major
-
6.4.0.GA, 7.0.0.GA, 7.1.0.GA, 7.2.9.GA, 7.3.6.GA
-
False
-
False
-
-
-
-
-
-
+
-
Undefined
-
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 ...)
- is cloned by
-
JBEAP-21938 [GSS](7.3.z) HHH-14616 - Optimistic Lock throws "could not retrieve version" exception
- Closed
- is incorporated by
-
JBEAP-21277 [GSS](7.4.z) Upgrade Hibernate ORM from 5.3.20.Final-redhat-00001 to 5.3.21.Final-redhat-00001
- Closed
- cloned from
-
HHH-14616 Loading...
- links to