playframework / playframework/play-samples
play-java-ebean-example is not working fails with BeanNotEnhancedException
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 554
- Forks
- 548
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 57
Description
The sample play-java-ebean-example has a runtime exception: [Guice/ErrorInjectingConstructor]: BeanNotEnhancedException: Bean class models.Company is not enhanced?
INFO p.a.h.HttpErrorHandlerExceptions - Registering exception handler: guice-provision-exception-handler
INFO p.a.d.DefaultDBApi - Database [default] initialized
INFO p.a.d.HikariCPConnectionPool - Creating Pool for datasource 'default'
@87gkd436b: Execution exception[[CreationException: Unable to create injector, see the following errors:
1) [Guice/ErrorInjectingConstructor]: 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 EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:42)
at EbeanDynamicEvolutions.class(EbeanDynamicEvolutions.java:35)
while locating EbeanDynamicEvolutions
at EbeanModule.bindings(EbeanModule.java:20):
Binding(class DynamicEvolutions to ConstructionTarget(class EbeanDynamicEvolutions) eagerly)
\_ installed by: Modules$OverrideModule -> GuiceableModuleConversions$$anon$4
while locating DynamicEvolutions
while locating ApplicationEvolutionsProvider
at EvolutionsModule.<init>(EvolutionsModule.scala:23):
Binding(class ApplicationEvolutions to ProviderConstructionTarget(class ApplicationEvolutionsProvider) eagerly)
\_ installed by: Modules$OverrideModule -> GuiceableModuleConversions$$anon$4
while locating ApplicationEvolutions
Learn more:
https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR
Caused by: 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 BeanDescriptorManager.confirmEnhanced(BeanDescriptorManager.java:1234)
at BeanDescriptorManager.setAccessors(BeanDescriptorManager.java:1120)
at BeanDescriptorManager.readDeployAssociations(BeanDescriptorManager.java:1049)
at BeanDescriptorManager.readEntityDeploymentAssociations(BeanDescriptorManager.java:613)
at BeanDescriptorManager.deploy(BeanDescriptorManager.java:275)
at InternalConfiguration.<init>(InternalConfiguration.java:111)
at DefaultContainer.createServer(DefaultContainer.java:114)
at DefaultContainer.createServer(DefaultContainer.java:33)
at DatabaseFactory.createInternal(DatabaseFactory.java:135)
at DatabaseFactory.create(DatabaseFactory.java:84)
at EbeanDynamicEvolutions.lambda$start$2(EbeanDynamicEvolutions.java:58)
at java.base/HashMap.forEach(HashMap.java:1430)
at EbeanDynamicEvolutions.start(EbeanDynamicEvolutions.java:58)
at EbeanDynamicEvolutions.<init>(EbeanDynamicEvolutions.java:46)
at EbeanDynamicEvolutions$$FastClassByGuice$$3dd7f92.GUICE$TRAMPOLINE(<generated>)
at EbeanDynamicEvolutions$$FastClassByGuice$$3dd7f92.apply(<generated>)
at DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
at ConstructorInjector.provision(ConstructorInjector.java:114)
at ConstructorInjector.construct(ConstructorInjector.java:91)
at ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at SingletonScope$1.get(SingletonScope.java:169)
at InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at FactoryProxy.get(FactoryProxy.java:60)
at ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at SingletonScope$1.get(SingletonScope.java:169)
at InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at InjectorImpl$1.get(InjectorImpl.java:1148)
at InjectorImpl.getInstance(InjectorImpl.java:1186)
at GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:434)
at GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:429)
at ContextClassLoaderInjector.$anonfun$instanceOf$2(Injector.scala:118)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The affected entry point is the play-java-ebean-example, which fails while constructing EbeanDynamicEvolutions. Start by running the sample and inspecting its Ebean enhancement configuration, including ebean.mf. Done means the sample starts without BeanNotEnhancedException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100