Skip to content

Unexpected errors with "hibernate.order_inserts=true" #50784

@DudekJakub

Description

@DudekJakub

Describe the bug

Hello everybody

We were debugging our PROD incident where we were getting errors like:

  • ERROR 500: {"details":"Error id cff13a4b-adf8-4ca9-92af-20ceb5a21bf2-1, org.hibernate.HibernateException: java.util.ConcurrentModificationException","stack":"org.hibernate.HibernateException: java.util.ConcurrentModificationException

  • ERROR 500: {"details":"Error id cff13a4b-adf8-4ca9-92af-20ceb5a21bf2-2, org.hibernate.HibernateException: java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "this.batchParamValues" is null"

  • ERROR 500: {"details":"Error id cff13a4b-adf8-4ca9-92af-20ceb5a21bf2-3, org.hibernate.HibernateException: java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "c" is null"

We were able to create reproducer:
https://github.com/DudekJakub/hibernate-issue-reproducer

Probably it is connected to below:
Enhance defaults in Hibernate ORM issue:
#41698

Zulip chat:
https://hibernate.zulipchat.com/#narrow/channel/132096-hibernate-user/topic/NullPointerExceptions.20in.20hibernate.20reactive/with/542244770

We understand that property hibernate.order_inserts is unsupported in Quarkus but recommended in hibernate.

We've seen that there is ongoing work on Panache2 so we just wanted to leave reproducer since those errors are difficult to invoke without heavy load.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

21.0.7

Quarkus version or git rev

3.28.2

Build tool (ie. output of mvnw --version or gradlew --version)

gradle-9.1.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/hibernate-ormHibernate ORMkind/bug-thirdpartyBugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions