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

Auto-indexing in Jandex of classes referenced from Hibernate ORM entities/embedables/XML mappings/etc. #17285

Closed
yrodiere opened this issue May 17, 2021 · 3 comments · Fixed by #17339
Labels
area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE kind/enhancement New feature or request
Milestone

Comments

@yrodiere
Copy link
Member

Description

See #14762 (comment)

When the Hibernate ORM extension encounters a class that is not in the Jandex index, we get this:

        [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#defineJpaEntities threw an exception: io.quarkus.deployment.configuration.ConfigurationError: Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:
        - org.agoncal.quarkus.jdbc.Customer
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.

This can happen for example if a class is referenced from an XML mapping file (#16630), or if a class is indirectly referenced from an entity getter (even if the entity class itself is in the Jandex index).

Can we improve the situation and index the corresponding artifact automatically, whenever we detect such a class is missing from the Jandex index?

Implementation ideas

None at the moment.

@yrodiere yrodiere added the kind/enhancement New feature or request label May 17, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented May 17, 2021

/cc @Sanne, @gsmet

@quarkus-bot quarkus-bot bot added area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE labels May 17, 2021
@yrodiere yrodiere changed the title Auto-indexing in Jandex of classes referenced from Hibernate ORM entities/embedables/etc. Auto-indexing in Jandex of classes referenced from Hibernate ORM entities/embedables/XML mappings/etc. May 17, 2021
@stuartwdouglas
Copy link
Member

@yrodiere
Copy link
Member Author

@stuartwdouglas Indeed it does the trick. I created #17339. Thanks!

@quarkus-bot quarkus-bot bot added this to the 2.0 - main milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE kind/enhancement New feature or request
Projects
None yet
2 participants