playframework / play-enhancer

14 stars 9 forks source link

JDK 11+ Support #23

Open Aunmag opened 4 years ago

Aunmag commented 4 years ago

Looks like Play Enhancer 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.

Flo354 commented 4 years ago

The error is also referenced from here: https://github.com/playframework/play-ebean/issues/189#issuecomment-577152414

@lapidus79 maybe if you have the time you could look at the problem?