[ 
https://issues.apache.org/jira/browse/CAMEL-20847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17853024#comment-17853024
 ] 

Grzegorz Grzybek commented on CAMEL-20847:
------------------------------------------

The screenshot shows {{org.jolokia.shaded.org.json.simple.xxx}} references. But 
this shaded class is ONLY included in one specific artifact:
{code:xml}
        <dependency>
            <groupId>org.jolokia</groupId>
            <artifactId>jolokia-agent-jvm</artifactId>
            <artifactId>jolokia-server-core</artifactId>
            <version>${jolokia-version}</version>
            <classifier>javaagent</classifier>
        </dependency>
{code}

This is explained in 
https://jolokia.org/migration.html#jolokia_jvm_agent_module.

Plain {{org.jolokia:jolokia-agent-jvm:jar:2.0.3:compile}} dependency (no 
classifier) simply depends on 
{{com.googlecode.json-simple:json-simple:jar:1.1.1:compile}} instead of shading 
it. Are you sure your classpath doesn't contain the {{javaagent}} version?

> camel-jbang - Run with jolokia enabled does not work
> ----------------------------------------------------
>
>                 Key: CAMEL-20847
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20847
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.6.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.7.0
>
>         Attachments: Screenshot 2024-06-06 at 16.12.21.png
>
>
> 2024-06-06 15:59:35.592 ERROR 78029 --- [ntloop-thread-0] 
> io.vertx.ext.web.RoutingContext          : Unhandled exception in router
> java.lang.NoSuchMethodError: 'org.json.simple.JSONObject 
> org.jolokia.server.core.http.HttpRequestHandler.handleThrowable(java.lang.Throwable)'
>     at 
> org.apache.camel.component.platform.http.plugin.DefaultJolokiaPlatformHttpPlugin.lambda$createVertxHandler$0(DefaultJolokiaPlatformHttpPlugin.java:184)
>  ~[camel-platform-http-jolokia-4.7.0-SNAPSHOT.jar:4.7.0-SNAPSHOT]
>     at 
> io.vertx.ext.web.impl.BlockingHandlerDecorator.lambda$handle$0(BlockingHandlerDecorator.java:48)
>  ~[vertx-web-4.5.7.jar:4.5.7]
>     at 
> io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:191) 
> ~[vertx-core-4.5.7.jar:4.5.7]
>     at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279) 
> ~[vertx-core-4.5.7.jar:4.5.7]
>     at 
> io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:210)
>  ~[vertx-core-4.5.7.jar:4.5.7]
>     at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) 
> ~[vertx-core-4.5.7.jar:4.5.7]
>     at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>  ~[?:?]
>     at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>  ~[?:?]
>     at 
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>  [netty-common-4.1.108.Final.jar:4.1.108.Final]
>     at java.base/java.lang.Thread.run(Thread.java:833) [?:?]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to