quarkus:dev does not report javax.enterprise.inject.UnsatisfiedResolutionException when started the first time

Created on 29 Jul 2020  路  1Comment  路  Source: quarkusio/quarkus

Describe the bug
Have a bean not managed by CDI and try to inject it in another bean, then without running mvn clean package, run mvn quarkus:dev

Expected behavior
The output should display the following exception:

[ERROR]     [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type io.quarkus.backports.IssueExtractor and qualifiers [@Default]
[ERROR]     - java member: io.quarkus.backports.GitHubService#issueExtractor
[ERROR]     - declared on CLASS bean [types=[java.lang.Object, io.quarkus.backports.GitHubService], qualifiers=[@Default, @Any], target=io.quarkus.backports.GitHubService]
[ERROR]     at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:990)
[ERROR]     at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:234)
[ERROR]     at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:120)
[ERROR]     at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:396)
[ERROR]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR]     at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
[ERROR]     at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR]     at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR]     at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR]     at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR]     at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR]     at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR]     at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type io.quarkus.backports.IssueExtractor and qualifiers [@Default]
[ERROR]     - java member: io.quarkus.backports.GitHubService#issueExtractor
[ERROR]     - declared on CLASS bean [types=[java.lang.Object, io.quarkus.backports.GitHubService], qualifiers=[@Default, @Any], target=io.quarkus.backports.GitHubService]
[ERROR]     at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:487)
[ERROR]     at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:362)
[ERROR]     at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:226)
[ERROR]     ... 14 more

Actual behavior
Only the following output is seen:

[INFO] --------------------< io.quarkus:quarkus-backports >--------------------
[INFO] Building quarkus-backports 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- quarkus-maven-plugin:1.6.1.Final:dev (default-cli) @ quarkus-backports ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to /home/ggastald/workspace/quarkus-backports/target/classes
Listening for transport dt_socket at address: 5005
2020-07-29 11:57:47,832 INFO  [org.jbo.threads] (main) JBoss Threads version 3.1.1.Final
2020-07-29 11:57:48,245 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start hot replacement endpoint to recover from previous Quarkus startup failure

Environment (please complete the following information):

  • Output of uname -a or ver: Fedora 32
  • Output of java -version: JDK 11
  • GraalVM version (if different from Java): Not used
  • Quarkus version or git rev: 1.6.1.Final
  • Build tool (ie. output of mvnw --version or gradlew --version): Maven 3.6.3

Additional context

The error is shown correctly in mvn clean package

kinenhancement

Most helpful comment

Hi @gastaldi, I just ran into the same issue this evening when developing with mvn quarkus:dev

Your suggestion to use mvn clean package as a workaround to find the issue worked for me too. Thanks to your bug report I could investigate my issue locally a bit more, thanks!

Turns out IntelliJ was also warning me about this one 馃槄

>All comments

Hi @gastaldi, I just ran into the same issue this evening when developing with mvn quarkus:dev

Your suggestion to use mvn clean package as a workaround to find the issue worked for me too. Thanks to your bug report I could investigate my issue locally a bit more, thanks!

Turns out IntelliJ was also warning me about this one 馃槄

Was this page helpful?
0 / 5 - 0 ratings