Reputation: 1470
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
Now, it is in:
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?
Upvotes: 0
Views: 1369
Reputation: 2848
For reference :
Hibernate 6 does have the problem too but baseline has been upgraded to JDK11 so going back to JDK10 is not a solution.
Created issue in Hibernate : https://hibernate.atlassian.net/browse/HHH-17579
PR created : https://github.com/hibernate/hibernate-orm/pull/7646 (fix version would be 6.4.2.Final).
Tested against https://github.com/laurentschoelens/hibernate-orm-xml-java11 -> OK
Upvotes: 0
Reputation: 1470
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
Upvotes: 0