Metamodel generation fails if executed from Eclipse

Description

Metamodel generation fails if started from Eclipse fails (starting it from gradle works fine).
It seems the struggle comes from annotations like “@NamedQueries({ @NamedQuery(name =...“.
The issue originally was reported as an Eclipse bug.
See:

See specially last comments from jukzi.

The exception:

Activity

Show:

Florian Hackenberger January 9, 2025 at 3:28 PM

So basically, if you want to use the Hibernate JPA Modelgen in eclipse, avoid the versions 6.3 - 6.5.2.Final, 6.5.3.Final might work, the 6.2 series also works.

Jan Wiemer May 22, 2024 at 9:35 AM

Thx for fixing it! This was really fast!

Gavin King May 22, 2024 at 9:28 AM

Thanks again folks, should be fixed by https://github.com/hibernate/hibernate-orm/pull/8420.

Alexander Kriegisch May 22, 2024 at 8:46 AM

BTW, I just updated the ECJ version on my reproducer branch mentioned in this GitHub comment. Just check out the branch to easily reproduce it, if it is convenient for you.

Gavin King May 22, 2024 at 8:42 AM

Thanks so much for investigating this. I agree that ecj implements this API correctly, and that our code worked by “luck” on javac.

Fixed

Details

Assignee

Reporter

Labels

Worked in

Fix versions

Affects versions

Priority

Created May 22, 2024 at 8:24 AM
Updated January 9, 2025 at 3:28 PM
Resolved May 22, 2024 at 9:28 AM