Skip to content

Token propagation throws java.lang.UnsupportedOperationException when adding the token to the request header parametersΒ #1182

@wmedvede

Description

@wmedvede

Tell us the extension you're using

Client

I tried this:

I tried to use the token propagation

This happened:

When the token propagation is enabled, the following exception is thrown when the propagated token is added to the request header parameters.

Caused by: jakarta.ws.rs.ProcessingException: java.lang.UnsupportedOperationException
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterRequest(ClientInvocation.java:652)
at org.jboss.resteasy.microprofile.client.impl.MpClientInvocation.filterRequest(MpClientInvocation.java:67)
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:424)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:134)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:102)
at jdk.proxy4/jdk.proxy4.$Proxy113.getTrackers(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
atase/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.restclient.runtime.QuarkusProxyInvocationHandler.invoke(QuarkusProxyInvocationHandler.java:173)
at jdk.proxy4/jdk.proxy4.$Proxy116.getTrackers(Unknown Source)
at org.kie.kogito.app.Mta_getTrackers.internalExecute(Mta_getTrackers.java:9)
at org.kie.kogito.app.Mta_getTrackers.internalExecute(Mta_getTrackers.java:5)
at org.kie.kogito.serverless.workflow.openapi.OpenApiWorkItemHandler.internalExecute(OpenApiWorkItemHandler.java:71)
at org.kie.kogito.serverless.workflow.WorkflowWorkItemHandler.activateWorkItemHandler(WorkflowWorkItemHandler.java:45)
at org.kie.kogito.process.workitems.impl.DefaultWorkItemLifeCyclePhase.execute(DefaultWorkItemLifeCyclePhase.java:65)
at org.kie.kogito.process.workitems.impl.DefaultWorkItemLifeCycle.transitionTo(DefaultWorkItemLifeCycle.java:56)
at org.kie.kogito.process.workitems.impl.DefaultKogitoWorkItemHandler.transitionToPhase(DefaultKogitoWorkItemHandler.java:103)
at org.kie.kogito.app.Mta_getTrackers_ClientProxy.transitionToPhase(Unknown Source)
at org.jbpm.process.instance.LightWorkItemManager.transitionWorkItem(LightWorkItemManager.java:202)
at org.jbpm.process.instance.LightWorkItemManager.internalExecuteWorkItem(LightWorkItemManager.java:95)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.lambda$internalTrigger$0(WorkItemNodeInstance.java:169)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.processWorkItemHandler(WorkItemNodeInstance.java:182)
... 64 more
Caused by: java.lang.UnsupportedOperationException
at java.base/java.util.Collections$UnmodifiableCollection.add(Collections.java:1067)
at org.jboss.resteasy.specimpl.MultivaluedTreeMap.add(MultivaluedTreeMap.java:44)
at io.quarkiverse.openapi.generator.providers.BearerAuthenticationProvider.filter(BearerAuthenticationProvider.java:38)
at io.quarkiverse.openapi.generator.providers.BaseCompositeAuthenticationProvider.filter(BaseCompositeAuthenticationProvider.java:40)
at org.kie.kogito.openapi.mta.api.auth.CompositeAuthenticationProvider.filter(CompositeAuthenticationProvider.java:13)
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterRequest(ClientInvocation.java:644)
... 88 more

I expected this:

the token to be propagated

Is there a workaround?

No response

How can we try to reproduce the issue?

No response

Anything else?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus OpenApi version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Community Notes

  • Please vote by adding a πŸ‘ reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞

Metadata

Metadata

Assignees

Labels

area:clientThis item is related to the client extension

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions