Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@Default] #11483

Closed
ArokLair opened this issue Aug 19, 2020 · 2 comments
Labels
area/arc Issue related to ARC (dependency injection) kind/question Further information is requested

Comments

@ArokLair
Copy link

Hi team.

We have a bug to compile maven project:

Failed to execute goal io.quarkus:quarkus-maven-plugin:1.7.0.Final:build (default) on project security: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 2 deployment problems:
[1] Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@default]
- java member: com.lafabril.ec.repository.AuthorityRepository#em
- declared on CLASS bean [types=[com.lafabril.ec.repository.AuthorityRepository, com.lafabril.ec.repository.AbstractRepository<com.lafabril.ec.domain.Authority, java.lang.String>, java.lang.Object], qualifiers=[@default, @Any], target=com.lafabril.ec.repository.AuthorityRepository]
[2] Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@default]
- java member: com.lafabril.ec.repository.UserRepository#em
- declared on CLASS bean [types=[com.lafabril.ec.repository.UserRepository, com.lafabril.ec.repository.AbstractRepository<com.lafabril.ec.domain.User, java.lang.Long>, java.lang.Object], qualifiers=[@default, @Any], target=com.lafabril.ec.repository.UserRepository]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:998)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:234)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:122)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:391)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Suppressed: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@default]
- java member: com.lafabril.ec.repository.AuthorityRepository#em
- declared on CLASS bean [types=[com.lafabril.ec.repository.AuthorityRepository, com.lafabril.ec.repository.AbstractRepository<com.lafabril.ec.domain.Authority, java.lang.String>, java.lang.Object], qualifiers=[@default, @Any], target=com.lafabril.ec.repository.AuthorityRepository]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:494)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:362)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:226)
... 14 more
Suppressed: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@default]
- java member: com.lafabril.ec.repository.UserRepository#em
- declared on CLASS bean [types=[com.lafabril.ec.repository.UserRepository, com.lafabril.ec.repository.AbstractRepository<com.lafabril.ec.domain.User, java.lang.Long>, java.lang.Object], qualifiers=[@default, @Any], target=com.lafabril.ec.repository.UserRepository]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:494)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:362)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:226)
... 14 more
-> [Help 1]

@ArokLair ArokLair added the kind/bug Something isn't working label Aug 19, 2020
@jaikiran jaikiran added the area/arc Issue related to ARC (dependency injection) label Aug 20, 2020
@stuartwdouglas
Copy link
Member

You are likely either missing the JPA extension or don't have any entities in your project.

@ArokLair
Copy link
Author

Yes, we solved add JPA conection in the application.propierties.

Thanks for response please close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants