[jboss-jira] [JBoss JIRA] (WFLY-13185) Rest-client can't be used without opentracing subsystem present in config

r searls (Jira) issues at jboss.org
Wed Mar 4 15:50:45 EST 2020


    [ https://issues.redhat.com/browse/WFLY-13185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989315#comment-13989315 ] 

r searls commented on WFLY-13185:
---------------------------------

The cause of the NullPointerException in RestClientExtension is the
"ProcessAnnotatedType<?> type" input parameter (i.e. class com.example.wfjwt.client.Service)
which Weld creates and passes into method RestClientExtension.registerRestClient no
longer has the annotation @RegisterRestClient.

I have traced the issue back to the point of Weld creation,
org.jboss.weld.annotated.slim.backed.BackedAnnotatedType line 64
    this.constructors = new BackedAnnotatedConstructors();
    
The constructor returned is 
    public abstract interface @ApplicationScoped class com.example.wfjwt.client.Service
There is no @RegisterRestClient annotation present.

I suggest contacting the Weld team about this.  I will be happy to collaborate
with them to resolve this but I know nothing about welds support for MPC.

> Rest-client can't be used without opentracing subsystem present in config
> -------------------------------------------------------------------------
>
>                 Key: WFLY-13185
>                 URL: https://issues.redhat.com/browse/WFLY-13185
>             Project: WildFly
>          Issue Type: Bug
>          Components: MP REST Client
>            Reporter: Jean Francois Denise
>            Assignee: Alessio Soldano
>            Priority: Critical
>         Attachments: README, rest-reproducer.zip
>
>
> Trying to provision the following set of galleon layers:
> jaxrs ==> for jaxrs and rest-client
> microprofile-config
> I am getting an NPE. If open-tracing is provisioned along with jaxrs, no NPE and client injection works fine.
> java.lang.NullPointerException
> 	at org.jboss.resteasy.microprofile.client.RestClientExtension.extractBaseUri(RestClientExtension.java:40)
> 	at org.jboss.resteasy.microprofile.client.RestClientExtension.registerRestClient(RestClientExtension.java:29)
> 	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 org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
> 	at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
> 	at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168)
> 	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
> 	at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
> 	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
> 	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
> 	at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:207)
> 	at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:176)
> 	at org.jboss.weld.bootstrap.BeanDeployer.processAnnotatedTypes(BeanDeployer.java:166)
> 	at org.jboss.weld.bootstrap.BeanDeployment.createTypes(BeanDeployment.java:219)
> 	at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:421)
> 	at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:79)
> 	at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:96)
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
> 	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
> 	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> 	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
> 	at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list