Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.3-next-M4, 2.3-next-M5
-
None
-
None
-
macos oracle JDK11 quarkus 1.7.3.Final myfaces-quarkus 2.3-next-M4
Description
<quarkus.platform.version>1.7.3.Final</quarkus.platform.version>
<dependency>
<groupId>org.apache.myfaces.core.extensions.quarkus</groupId>
<artifactId>myfaces-quarkus</artifactId>
<version>2.3-next-M4</version>
</dependency>
the below code for example is injecting a restclient into a viewscoped bean .... while compiling it generates CDI dependency error.
import org.eclipse.microprofile.rest.client.inject.RestClient;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.Serializable;
import java.util.List;
@Named
@ViewScoped
public class SomeClass implements Serializable {
private static final long serialVersionUID = 2174143885608958202L;
@Inject
@RestClient
SomeRestClient someRestClient;
public String saySomething()
{ String result = someRestClient.dowork(); return "blablalba " + result; }}
gives the below compilation error
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: 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 com.example.demo.restservices.SomeRestClient and qualifiers [@Default] - java member: com.example.SomeClass#someRestClient - declared on CLASS bean [types=[java.io.Serializable, java.lang.Object, com.example.SomeClass], qualifiers=[@Named, @Default, @Any], target=com.example.SomeClass] at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:990) 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 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: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.base/java.lang.Thread.run(Thread.java:834) at org.jboss.threads.JBossThread.run(JBossThread.java:479)Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.example.demo.restservices.someClient and qualifiers [@Default] - java member: com.example.SomeClass#someTblTranslationRestClient - declared on CLASS bean [types=[java.io.Serializable, java.lang.Object, com.example.SomeClass], qualifiers=[@Named, @Default, @Any], target=com.example.SomeClass] 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