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

UnsatisfiedResolutionException : Build Failed with Mapstruct and Quarkus 1.13.0 #16200

Closed
rebillard-maxime opened this issue Apr 2, 2021 · 2 comments · Fixed by #16214
Closed
Labels
area/gradle Gradle kind/bug Something isn't working
Milestone

Comments

@rebillard-maxime
Copy link

Describe the bug

I came accross a build issue with mapstruct regarding the new quarkus version (1.13.0), that didn't happen on version 1.12.2.

On Quarkus version 1.12.2 my code build without errors.
On Quarkus version 1.13.0 my code doesn't build.

(same Mapstruct version)

Expected behavior

I expect the code to build without errors.

Actual behavior

It didn't build properly and got dependency injection issues using Mapstruct mappers.
Moreover, implementation classes are not generated.

My stacktrace :


* What went wrong:
Execution failed for task ':quarkusBuild'.
> 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: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.PersonMapper and qualifiers [@Default]
        - java member: org.acme.PersonResource#personMapper
        - declared on CLASS bean [types=[java.lang.Object, org.acme.PersonResource], qualifiers=[@Default, @Any], target=org.acme.PersonResource]
        at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1081)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:255)
        at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:129)
        at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:419)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
        at java.base/java.lang.Thread.run(Thread.java:834)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
  Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.acme.PersonMapper and qualifiers [@Default]
        - java member: org.acme.PersonResource#personMapper
        - declared on CLASS bean [types=[java.lang.Object, org.acme.PersonResource], qualifiers=[@Default, @Any], target=org.acme.PersonResource]
        at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:484)
        at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:378)
        at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:247)
        ... 12 more

To Reproduce

The code can be found from the following repo : https://github.com/rebillard-maxime/quarkus-1.13.0-mapstruct-test

  1. Clone the project
  2. Check the gradle properties (quarkusPluginVersion and quarkusPlatformVersion must be equal to 1.13.0)
  3. Run the command gradle build
  4. Check the console
  5. You'll get the stacktrace from above.

Environment :

Output of uname -a or ver

Linux administrateur-XPS-13-7390 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03, mixed mode, sharing)

Quarkus version or git rev

Quarkus 1.13.0

Build tool

Gradle 6.8.3

MapStruct version

1.3.1

@rebillard-maxime rebillard-maxime added the kind/bug Something isn't working label Apr 2, 2021
@rebillard-maxime
Copy link
Author

rebillard-maxime commented Apr 2, 2021

It seems linked to [/issues/16196)]

@glefloch
Copy link
Member

glefloch commented Apr 2, 2021

thanks for reporting this. I will look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants