Skip to content

Support for multiple persistence units in Hibernate Reactive with Panache #49945

@dgusoft

Description

@dgusoft

Describe the bug

When having two reactive hibernate orm datasources the entities of the named non default datasource can't per persisted (Class 'class ...' is not an entity class).

Secondly when having only named reactive hibernate orm datasources and defining the default one using quarkus.datasource.default= then there is an java.lang.IllegalStateException: Mutiny.SessionFactory bean not found

Expected behavior

Persisting Entity using Repository should work in every case with multiple reactive hibernate orm datasources.

Actual behavior

I provided a sample app with a detailed readme of the cases I investigated. Different Exceptions occur

How to Reproduce?

Please see the readme.md file in the attached tgz file. I provided detailed information in there and shell scripts.

Output of uname -a or ver

Darwin ... 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6041 arm64

Output of java -version

openjdk version "24.0.1" 2025-04-15 OpenJDK Runtime Environment Temurin-24.0.1+9 (build 24.0.1+9) OpenJDK 64-Bit Server VM Temurin-24.0.1+9 (build 24.0.1+9, mixed mode, sharing)

Quarkus version or git rev

3.26.2

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

Apache Maven 3.9.9

Additional information

I used docker to run the sample postgresql databases. The startdb.sh in helper-Folder must be adapted if using portainer or anything else.

multiple_reactive.tgz

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions