-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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] by extensions: quarkus-hibernate-orm + quarkus-jdbc-mssql + quarkus-undertow #7280
Comments
@waldimiro does any stacktrace appear before that error? I have a project using H2 DB and it works fine |
@gastaldi with clean quarkus:dev "C:\Program Files\Java\java-11-openjdk-11.0.3.7-1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:64446,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=C:\development\code-with-quarkus "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\plugins\maven\lib\maven-event-listener.jar" -javaagent:C:\Users\taarowa1.IntelliJIdea2019.3\system\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.2\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version2019.3.3 clean quarkus:dev
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
Caused by: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@default] 14:01:52,692 INFO [io.qua.dev.DevModeMain] Attempting to start hot replacement endpoint to recover from previous Quarkus startup failure |
Ah yes, you must have an |
Try creating a class like this in your project: package org.acme;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class Cake {
@Id
Long id;
} |
There is an issue (#7148) asking the possibility to inject an |
@gastaldi With the "Cake" it works ;) thanks!! |
Describe the bug
By add quarkus-hibernate-orm + quarkus-jdbc-mssql + quarkus-undertow extensions, I can't start the application due to: Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [@default].
Expected behavior
EntityManager must be crerated.
Actual behavior
Quarkus doesn't starts.
To Reproduce
Steps to reproduce the behavior:
@Inject EntityManager entityManager;
Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: