Hibernate 6.x - IllegalStateException: Illegal pop

We are getting the below error from our spring boot (version 3.x) code while fetching detail from Postgresql and Oracle Database through hibernate 6.5 with java 21. This issue occurs only if more than 20 users access the endpoint concurrently.
We are getting the error at this line in the code
final Long productCategoryId = productCategory.getId();
Here productCategory is the Entity class mapped to a table in DB and getId method belongs to that same class to fetch the ID and return.

Unexpected exception: java.lang.IllegalStateException: Illegal pop() with non-matching JdbcValuesSourceProcessingState at org.hibernate.sql.results.spi.LoadContexts.deregister(LoadContexts.java:45)_ at org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:230)_ at org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:33)_ at org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.doExecuteQuery(JdbcSelectExecutorStandardImpl.java:211)_ at org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.executeQuery(JdbcSelectExecutorStandardImpl.java:83)_ at org.hibernate.sql.exec.spi.JdbcSelectExecutor.list(JdbcSelectExecutor.java:76)_ at org.hibernate.sql.exec.spi.JdbcSelectExecutor.list(JdbcSelectExecutor.java:65)_ at org.hibernate.loader.ast.internal.SingleIdLoadPlan.load(SingleIdLoadPlan.java:145)_ at org.hibernate.loader.ast.internal.SingleIdLoadPlan.load(SingleIdLoadPlan.java:117)_ at org.hibernate.loader.ast.internal.SingleIdEntityLoaderStandardImpl.load(SingleIdEntityLoaderStandardImpl.java:75)_ at org.hibernate.persister.entity.AbstractEntityPersister.doLoad(AbstractEntityPersister.java:3726)_ at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3715)_ at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:604)_ at org.hibernate.event.internal.DefaultLoadEventListener.loadFromCacheOrDatasource(DefaultLoadEventListener.java:590)_ at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:560)_ at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:544)_ at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:207)_ at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:106)_ at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68)_ at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:138)_ at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1225)_ at org.hibernate.internal.SessionImpl.immediateLoad(SessionImpl.java:1044)_ at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:174)_ at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:314)_ at org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor.intercept(ByteBuddyInterceptor.java:44)_ at org.hibernate.proxy.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:102)

Sorry, but Hibernate ORM 6.5 is not supported anymore. You will have to at least upgrade to the latest 6.6 version, or even better to 7.1.

We have the below queries regarding different versions of hibernate, Can you please respond to it.

  1. what is the end of Life Date for hibernate 6.4 and 6.6?
  2. Post end of life, will there be paid support available?
  3. If paid support available for the above mentioned versions, what will be the cost estimation?

Only the latest Hibernate ORM version gets community support and regular bug fixes. Here is an overview of the versions and the support status: Releases - Hibernate ORM
Other versions are unsupported or receive limited support (only bug fixes are backported that are requested by customers). Also see Maintenance Policy - Hibernate
For supports contracts, contact Red Hat or IBM sales: Support - Hibernate ORM

Before deciding on the version to use, my organization wants to get the details I had requested earlier.

  1. what is the end of Life Date for hibernate 6.4 and 6.6?
  2. Post end of life, will there be paid support available?
  3. If paid support available for the above mentioned versions, what will be the cost estimation?

Based on the inputs, we would be deciding whether to use the 6.4 / 6.6 / 7.x version. Currently, we are leaning towards 6.4/6.6 for which we are requesting the details.

Appreciate if you can provide specific inputs on those in terms of cost, dates and pricing model.

I can’t help you with details like pricing or support timeframes. You will have to discuss the pricing with IBM or Red Hat sales.
At this time, Hibernate ORM support is bound to Red Hat runtimes subscriptions for JBoss EAP or Red Hat build of Quarkus (RHBQ). JBoss EAP 8.0 comes with Hibernate ORM 6.2 and JBoss EAP 8.1 will come with Hibernate ORM 6.6. There are also RHBQ versions that come with Hibernate ORM 6.6 and soon, there will be a RHBQ version with Hibernate ORM 7.1.
I don’t know what the official support time frames for these products are, but usually, a support time frame extension can be bought if needed. But in the end, only a Red Hat or IBM sales person can tell you for sure which version, for how long and for what price you can buy support.