Java Ebean example is broken with modern JDK
Aunmag opened this issue · 2 comments
Aunmag commented
Looks like Ebean example doesn't enhance classes since JDK 11 (OpenJDK) but works fine with 10. When I run play-java-ebean-example 2.6 or 2.7 I get following errors:
CreationException: Unable to create injector, see the following errors:
1) Error injecting constructor, io.ebean.config.BeanNotEnhancedException: Bean class models.Company is not enhanced? Check packages specified in ebean.mf. If you are running in IDEA or Eclipse check that the enhancement plugin is installed. See https://ebean.io/docs/trouble-shooting#not-enhanced
at play.db.ebean.EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:35)
at play.db.ebean.EbeanDynamicEvolutions.class(EbeanDynamicEvolutions.java:32)
while locating play.db.ebean.EbeanDynamicEvolutions
at play.db.ebean.EbeanModule.bindings(EbeanModule.java:21):
Binding(class play.api.db.evolutions.DynamicEvolutions to ConstructionTarget(class play.db.ebean.EbeanDynamicEvolutions) eagerly) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$4)
while locating play.api.db.evolutions.DynamicEvolutions
Caused by: io.ebean.config.BeanNotEnhancedException: Bean class models.Company is not enhanced? Check packages specified in ebean.mf. If you are running in IDEA or Eclipse check that the enhancement plugin is installed. See https://ebean.io/docs/trouble-shooting#not-enhanced
at io.ebeaninternal.server.deploy.BeanDescriptorManager.setEntityBeanClass(BeanDescriptorManager.java:1575)
at io.ebeaninternal.server.deploy.BeanDescriptorManager.createByteCode(BeanDescriptorManager.java:1440)
at io.ebeaninternal.server.deploy.BeanDescriptorManager.readDeployAssociations(BeanDescriptorManager.java:1349)
at io.ebeaninternal.server.deploy.BeanDescriptorManager.readEntityDeploymentAssociations(BeanDescriptorManager.java:764)
at io.ebeaninternal.server.deploy.BeanDescriptorManager.deploy(BeanDescriptorManager.java:374)
...
I use OpenJDK.
octonato commented
Hi @Aunmag,
Ebean is being built for JDK11. https://github.com/ebean-orm/ebean/blob/master/.travis.yml#L6
That's probably related to version.
Play ebean is using v11.33.2
https://github.com/playframework/play-ebean/blob/master/build.sbt#L8
But Ebean itself is already v12.1.3
Please, can you try to update it in your project to v12.1.3 and report the results?
Thanks
Aunmag commented
It works now