Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hibernate ORM: package-info is ignored when specifying scan packages #39299

Closed
flokle opened this issue Mar 8, 2024 · 2 comments · Fixed by #39715
Closed

Hibernate ORM: package-info is ignored when specifying scan packages #39299

flokle opened this issue Mar 8, 2024 · 2 comments · Fixed by #39715
Labels
area/hibernate-orm Hibernate ORM kind/bug Something isn't working
Milestone

Comments

@flokle
Copy link

flokle commented Mar 8, 2024

Describe the bug

When specifying scan packages via application property quarkus.hibernate-orm.packages package-info-Files within these scan-packages are not taken into account.

Expected behavior

package-info-Files within quarkus.hibernate-orm.packages can be interpreted by hibernate.

Actual behavior

Having for example a hibernate @FilterDef within a package-info.java, startup of Quarkus will stop with an exception:

org.hibernate.AnnotationException: Entity 'MyEntity' has a '@Filter' for an undefined filter named 'filterDeleted'

Removing the property quarkus.hibernate-orm.packages fixes the problem.

How to Reproduce?

I have created a simple reproducible:

https://github.com/flokle/bug-reproducibles/tree/main/java/quarkus-orm-package-info-ignored-bug

Starting this project with goal compile quarkus:dev will lead to a failed startup. Removing the quarkus.hibernate-orm.packages property from /src/main/resources/application.properties and running again leads to a successfull start.

Output of uname -a or ver

Darwin Florians-MBP 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 arm64

Output of java -version

openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08, mixed mode, sharing)

Quarkus version or git rev

3.8.2

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

No response

Additional information

io.quarkus.hibernate.orm.runtime.boot.scan.QuarkusScanner.Result removes the package-info-candidate in line 61/62

@flokle flokle added the kind/bug Something isn't working label Mar 8, 2024
@gsmet gsmet changed the title Quarkus ORM: package-info is ignored when specifying scan packages Hibernate ORM: package-info is ignored when specifying scan packages Mar 9, 2024
@gsmet gsmet added area/hibernate-orm Hibernate ORM and removed triage/needs-triage labels Mar 9, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 9, 2024

/cc @yrodiere (hibernate-orm)

@yrodiere
Copy link
Member

yrodiere commented Mar 18, 2024

Thanks for reporting.

If anyone has time to look at this, my bet would be on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants