Issue
I am unable to build JPA2 projects after upgrading my JDK to 11 and getting errors, cannot find symbol. I checked and the package names have changed in 11. So, for instance:
Generated is no longer in:
javax.annotation
javax.annotation.processing
I have upgraded to the latest version of hibernate jpamodelgen (5.4.6.Final) and the latest version of the maven-processor-plugin (3.3.3).
However, it seems they do not yet support JDK11. Is that accurate?
Solution
I switched to JDK10 and that has resolved my build problem with JPA model gen. In the meantime, I am filing a bug report with Hibernate.
Note, that I had to depend on jsr250:
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
I added this to a profile which is only activated for JPA2 projects along with performing the JPA2 modelgen plugin stuff.
Link to bug report: https://hibernate.atlassian.net/browse/HBX-1869
Answered By - Walter
Answer Checked By - Pedro (JavaFixing Volunteer)