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

Claus Ibsen commented on CAMEL-27326:
-------------------------------------

Fixed in 4.24.0 by https://github.com/apache/camel/pull/30544: a transform run 
runs with camel.main.jmxEnabled=false, with a test that asserts it registers no 
MBeans. The tests of camel-jbang-run and camel-jbang-plugin-tui run with Camel 
JMX off.

_Claude Code on behalf of Claus Ibsen_

> camel-jbang - transient runs at the same time fail with 
> InstanceAlreadyExistsException for the JMX name transform
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27326
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27326
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> A tool that renders or reads routes without running them (the MCP tool 
> {{camel_render_route_diagram}}, {{camel cmd route-diagram}} / 
> {{route-structure}} on source files, {{camel transform route}}, {{camel 
> validate yaml-normalize}}) boots a short-lived in-process Camel through 
> {{Run.runTransform}}. Every such run names its CamelContext {{transform}} and 
> keeps JMX on. When two run at the same time in one JVM, as the MCP server 
> does with concurrent calls, the second one fails:
> {noformat}
> Failed to render route diagram 
> (org.apache.camel.dsl.jbang.run.IntegrationStartException):
> javax.management.InstanceAlreadyExistsException: 
> org.apache.camel:context=transform,type=context,name="transform"
> {noformat}
> {{RouteDiagramToolsTest.callsAtTheSameTime}} fails this way from time to 
> time; it failed twice in full runs of camel-jbang-mcp on 2026-11-21 and 
> passed on rerun. CAMEL-27156 fixed the shared work directory of the same 
> test, not this.
> Fix: a transform run does not need JMX (it only dumps the route structure to 
> files), so it runs with {{camel.main.jmxEnabled=false}}, as it already runs 
> silent and stubbed.
> _Created by Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to