Hello,

Thanks for the detailed report and the reproducer. I just opened
https://issues.apache.org/jira/browse/CAMEL-24052 .
The issue is that *LwModelToXMLDumper.resolveEndpointDslUris()* temporarily
resolves EndpointDSL builders to plain URI strings before serialization,
but does not restore the original reference. The same bug exists in the
YAML, Java DSL, and JAXB XML dumpers.

Thanks,
Federico

Il giorno lun 13 lug 2026 alle ore 14:09 Valentin Brückel <
[email protected]> ha scritto:

> Hi everyone,
>
> I ran into a problem when setting up a test configuration of a project
> that uses Endpoint DSL to inject two different S3Client beans into a route
> in a type-safe manner.
> When using Advice with to mock an unrelated part of the route, Camel
> suddenly seemed to ignore my pre-configured S3Clients and tried
> (unsuccessfully) to instantiate a default client.
>
> After some digging, I found that
> modelToXMLDumper.dumpModelAsXml(camelContext, definition) forces the
> EndpointBuilder to become a URI String that seems to be missing a proper
> reference to the bean we need to use. If I set the optional logXml
> parameter of adviceWith() to false, the Advice works as expected.
>
> I see two issues here:
>
>    1. Coercing an EndpointBuilder to a URI String generates a
>    "hash=12345678" parameter that apparently doesn't encode the bean correctly
>    2. The RouteDefinition GETS MUTATED BY A LOGGING STATEMENT
>
>
> Test case here:
> https://github.com/bridgerdier/camel-advicewith-endpointdsl/
>
> Cheers,
>
> Valetnin Brückel
>
>
>
> *predic8 GmbH*
>
> Koblenzer Str. 65
>
> 53173 Bonn
>
>
>
> predic8.de <https://www.predic8.de/>
>
> Tel: +4
> <https://predic8-wiki.atlassian.net/wiki/spaces/inet/pages/372670466/Outlook#>9
> (0) 228 5552576-0
>
> Fax: +49 (0) 228 5552576-50
>
>
>
> Amtsgericht Bonn
>
> HRB 16152
>
> Geschäftsführer: Thomas Bayer, Tobias Polley
>

Reply via email to