JPMS: Cannot invoke "javax.lang.model.element.Element.getAnnotationMirrors()" because "element" is null
Description
While attempting to create a minimal reproducer and adding a simple JPA entity, then I added a module-info.java upon adding the module-info.java the error reproduced, so there’s some incompatibility with jpms that didn’t exist before.
Note: most of the reproducer is certainly unnecessary
tried adding the exports/opens (all) in case that would resolve it, but it doesn’t. I don’t understand how an annotation preprocessor interacts with JPMS.
Attachments
1
Activity
Show:
Caleb Cushing May 31, 2024 at 3:04 PM
No regression test either? I might be willing to take a look. Hopefully it's not too hard to bisect…
Gavin King May 30, 2024 at 9:48 PM
You’re very welcome to take a look at what changed and send a PR. (I don’t make the call on what gets backported, however.)
Caleb Cushing May 30, 2024 at 9:35 PM
Is there any way that you would consider trying to figure it out and backporting a fix to 6.5? I know there will be no chance that spring boot 3.3 will update to 6.6 so it's another year for people who don't want to override the version. I probably can override the version it just seems like they should be backported since it is a regression.
Gavin King May 30, 2024 at 7:52 PM
Edited
Not sure what was causing this, but updating to org.hibernate.orm:hibernate-jpamodelgen:6.6.0-SNAPSHOT fixes it.
While attempting to create a minimal reproducer and adding a simple JPA entity, then I added a module-info.java upon adding the module-info.java the error reproduced, so there’s some incompatibility with jpms that didn’t exist before.
Note: most of the reproducer is certainly unnecessary
tried adding the exports/opens (all) in case that would resolve it, but it doesn’t. I don’t understand how an annotation preprocessor interacts with JPMS.