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

When using Panache with envers it fails with no classes in jandexindex. #40346

Closed
janderssonse opened this issue Apr 29, 2024 · 2 comments
Closed
Labels
area/panache kind/bug Something isn't working

Comments

@janderssonse
Copy link
Contributor

Describe the bug

When configuring hibernate and panache to run with envers one gets the [error]: Build step io.quarkus.hibernate.orm.panache.deployment.PanacheHibernateResourceProcessor#validate threw an exception: java.lang.IllegalStateException: io.quarkus.builder.BuildException: Build failure: The class org.hibernate.envers.DefaultRevisionEntity is not inside the Jandex index.

I peeked in the code, https://github.com/quarkusio/quarkus/blob/3b6f5c3904a7ad5dc3aa2bad375e1ca076e7c844/extensions/panache/hibernate-orm-panache/deployment/src/main/java/io/quarkus/hibernate/orm/panache/deployment/PanacheHibernateResourceProcessor.java does not seem to have logic for or inherit any of the logic for adding envers to the jandex index. As can be seen here https://github.com/quarkusio/quarkus/pull/12476/files# for example.

Expected behavior

The envers main classes should be added to the jandexindex.

Actual behavior

[error]: Build step io.quarkus.hibernate.orm.panache.deployment.PanacheHibernateResourceProcessor#validate threw an exception: java.lang.IllegalStateException: io.quarkus.builder.BuildException: Build failure: The class org.hibernate.envers.DefaultRevisionEntity is not inside the Jandex index.

How to Reproduce?

quarkus 3.8.4, java 17, set up a small db postgresql, get basic hibernate and panache orm working, add quarks envers, with correct audit tables, see the error above upon running.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

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

No response

Additional information

I can probally find the time soon to add a small mvn-example of this.

@janderssonse janderssonse added the kind/bug Something isn't working label Apr 29, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 29, 2024

/cc @FroMage (panache), @loicmathieu (panache)

@janderssonse
Copy link
Contributor Author

This bug report was a case of PEBKAC- "Problem Exists Between Keyboard And Chair" It har now been corrected by further examination of the docs i noticed I shouldn't NOT extend the DefafultRevisionEntity when creating my own revisionlog, just map it accordingly and correct. Problem solved and closing https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#envers-revisionlog

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

No branches or pull requests

1 participant