You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Michael Rambichler (Jira)" <ji...@apache.org> on 2021/12/29 10:43:00 UTC
[jira] [Commented] (CAMEL-17390) Cannot set tracer on a started CamelContext
[ https://issues.apache.org/jira/browse/CAMEL-17390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466421#comment-17466421 ]
Michael Rambichler commented on CAMEL-17390:
--------------------------------------------
This is also reproducable within a Unit Test and @BeforeEach : Camel 3.14.0
{noformat}
@CamelSpringBootTest
public class Test {
@BeforeEach
public void setup() throws Exception {
camelContext.setTracing(true);
......
}
....
}{noformat}
> Cannot set tracer on a started CamelContext
> -------------------------------------------
>
> Key: CAMEL-17390
> URL: https://issues.apache.org/jira/browse/CAMEL-17390
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Affects Versions: 3.14.0
> Environment: OS: Windows 8 / Windows 10
> Java: OpenJDK 11 (OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9))
> Camel: 3.14.0
> Reporter: Raymond
> Priority: Minor
>
> context = new DefaultCamelContext(registry);
> //setting tracing standby to true, so it can be enabled during runtime
> context.setTracingStandby(true);
>
> During runtime I later want to set the tracing on demand:
> Tracer tracer = context.getTracer();
> tracer.setEnabled(true);
> Following the documentation: [https://camel.apache.org/manual/tracer.html]
> However when setting:
> context.setTracingStandby(true);
> And then start a Camel route (context.addRoute(myRoute); or context.addOrUpdateRoutes(myRoute)) I get the following error:
> org.apache.camel.FailedToCreateRouteException: Failed to create route 33-33 at: >>> SetHeader[AssimblyHeaderId, null] <<
> < in route: Route(33-33)[From[file://C:\test1] -> [SetHeader[AssimblyHea... because of Cannot set tracer on a started Ca
> melContext
> at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:240)
> at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74)
> at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
> at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:868)
> at org.apache.camel.impl.DefaultModel.addRouteDefinitions(DefaultModel.java:185)
> at org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:336)
> at org.apache.camel.builder.RouteBuilder.populateOrUpdateRoutes(RouteBuilder.java:652)
> at org.apache.camel.builder.RouteBuilder.updateRoutesToCamelContext(RouteBuilder.java:530)
> In my routebuilder or before I can not find an entry where I set the tracer. In 3.11.x I have the following context.setTracer(true); (but I removed this line). Could you check if you can reproduce this?
> When I put the following line in comment the error goes away:
> //context.setTracingStandby(true);
> But then I cannot set it at runtime.
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)