[jira] [Created] (CAMEL-20486) JMS OutOfMemoryError in Streaming Mode
Michael Rambichler created CAMEL-20486: -- Summary: JMS OutOfMemoryError in Streaming Mode Key: CAMEL-20486 URL: https://issues.apache.org/jira/browse/CAMEL-20486 Project: Camel Issue Type: Bug Components: camel-jms Affects Versions: 3.22.0 Environment: *Environment: Platform: MacOS, Camel 3.22.0, Spring Boot: v2.7.18, Java 17.0.5* Reporter: Michael Rambichler We are struggling with big messages sent over jms in streaming fashion in production. *Expected:* Messages are transferred in streaming mode without the need of the equivalent amount of memory as the size of the file. *Currently: Java.lang.OutOfMemoryError: Java heap space* *Environment: Platform: MacOS, Camel 3.22.0* And started some analysis locally with the following outcome: We setup a simple route wich receives a message from jms. {code:java} from("jms:testjms_q?streamMessageTypeEnabled=true&artemisStreamingEnabled=true&jmsMessageType=Bytes") .log("Start streaming from jms") .to("stream:out") .log("Finished"); {code} For testing purpose we restricted the Java Heap Size to 700MB (-Xmx700m) After some analysis we see the {code:java} io.netty.util.internal.PlatformDependent.allocateUninitializedArray(int size) { return UNINITIALIZED_ARRAY_ALLOCATION_THRESHOLD < 0 || UNINITIALIZED_ARRAY_ALLOCATION_THRESHOLD > size ? new byte[size] : PlatformDependent0.allocateUninitializedArray(size); }{code} Where size is equivalent with the message size awaiting in the JMS queue (around 1GB) Which of course lead to a OutOfMemoryError {code:java} /:: Spring Boot :: (v2.7.18) 2024-02-28 19:00:54.857 INFO 36343 --- [ main] org.example.MySpringBootApplication : Starting MySpringBootApplication using Java 17.0.5 on atca-052347 with PID 36343 (/Users/at00191173/dev/src/playground/helloJms/target/classes started by at00191173 in /Users/at00191173/dev/src/playground/helloJms)2024-02-28 19:00:54.859 INFO 36343 --- [ main] org.example.MySpringBootApplication : No active profile set, falling back to 1 default profile: "default"2024-02-28 19:00:55.518 WARN 36343 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used2024-02-28 19:00:55.528 INFO 36343 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext2024-02-28 19:00:55.528 INFO 36343 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 645 ms2024-02-28 19:00:56.079 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : sun.misc.Unsafe: available2024-02-28 19:00:56.080 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : -Dio.netty.tmpdir: /var/folders/1j/85cl6ywn0tbg9tg4z_kbnhsrgr/T (java.io.tmpdir)2024-02-28 19:00:56.080 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : -Dio.netty.bitMode: 64 (sun.arch.data.model)2024-02-28 19:00:56.080 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : Platform: MacOS2024-02-28 19:00:56.080 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : -Dio.netty.maxDirectMemory: -1 bytes2024-02-28 19:00:56.080 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : -Dio.netty.uninitializedArrayAllocationThreshold: -12024-02-28 19:00:56.081 DEBUG 36343 --- [ main] i.netty.util.internal.PlatformDependent : -Dio.netty.noPreferDirect: false2024-02-28 19:00:56.181 INFO 36343 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'2024-02-28 19:00:56.227 INFO 36343 --- [ main] io.undertow : starting server: Undertow - 2.2.28.Final2024-02-28 19:00:56.231 INFO 36343 --- [ main] org.xnio : XNIO version 3.8.7.Final2024-02-28 19:00:56.236 INFO 36343 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.8.7.Final2024-02-28 19:00:56.256 INFO 36343 --- [ main] org.jboss.threads : JBoss Threads version 3.1.0.Final2024-02-28 19:00:56.276 INFO 36343 --- [ main] o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s) 8080 (http)2024-02-28 19:00:56.398 DEBUG 36343 --- [ main] o.a.camel.component.jms.JmsEndpoint : Using destinationName: testjms_q on listenerContainer: org.apache.camel.component.jms.DefaultJmsMessageListenerContainer@68454ed52024-02-28 19:00:56.400 INFO 36343 --- [ main] o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.22.0 (MyCamel) is starting2024-02-28
[jira] [Comment Edited] (CAMEL-19615) camel-ftp: chmodDirectory option try for each junk to change the directory permission and fails
[ https://issues.apache.org/jira/browse/CAMEL-19615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744565#comment-17744565 ] Michael Rambichler edited comment on CAMEL-19615 at 7/19/23 1:16 PM: - PR created: [https://github.com/apache/camel/pull/10730] was (Author: rambichler): Pullrequest created: [https://github.com/apache/camel/pull/10727] > camel-ftp: chmodDirectory option try for each junk to change the directory > permission and fails > --- > > Key: CAMEL-19615 > URL: https://issues.apache.org/jira/browse/CAMEL-19615 > Project: Camel > Issue Type: Improvement > Components: camel-sftp >Affects Versions: 3.18.2 >Reporter: Michael Rambichler >Priority: Major > > We have a blocking issue with the current chmodDirectory option. > [https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_chmodDirectory] > > *Steps to reproduce:* > SFTP Directory: ../home/user/restricted/dir/subdir (where restricted e.g. > does not have change rights for the current user) > Component Call: > "sftp://localhost:21/home/user/restricted/dir/subdir/newDir"; + > "?username=admin&password=admin&chmod=777&chmodDirectory=770" > > *Behaviour:* > The current implementation steps down the directory and try to create each > junk. If the chmodDirectory option is set then i{color:#FF}t will try for > each (already existing junk) to change the directory permission and > fails.{color} > > *Expected Behaviour:* > It should only try to change the permission if the directory does not yet > exists > > I have already created a fix and added a Testcase for better debugging (but > the Testcase does not reproduce the error because it would remove the > permission for the current user and afterwards your need root rights to > delete the Testdirectory again. Not suitable pipeline builds) > [https://github.com/michael-salzburg/camel] > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-19615) camel-ftp: chmodDirectory option try for each junk to change the directory permission and fails
[ https://issues.apache.org/jira/browse/CAMEL-19615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744565#comment-17744565 ] Michael Rambichler commented on CAMEL-19615: Pullrequest created: [https://github.com/apache/camel/pull/10727] > camel-ftp: chmodDirectory option try for each junk to change the directory > permission and fails > --- > > Key: CAMEL-19615 > URL: https://issues.apache.org/jira/browse/CAMEL-19615 > Project: Camel > Issue Type: Improvement > Components: camel-sftp >Affects Versions: 3.18.2 >Reporter: Michael Rambichler >Priority: Major > > We have a blocking issue with the current chmodDirectory option. > [https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_chmodDirectory] > > *Steps to reproduce:* > SFTP Directory: ../home/user/restricted/dir/subdir (where restricted e.g. > does not have change rights for the current user) > Component Call: > "sftp://localhost:21/home/user/restricted/dir/subdir/newDir"; + > "?username=admin&password=admin&chmod=777&chmodDirectory=770" > > *Behaviour:* > The current implementation steps down the directory and try to create each > junk. If the chmodDirectory option is set then i{color:#FF}t will try for > each (already existing junk) to change the directory permission and > fails.{color} > > *Expected Behaviour:* > It should only try to change the permission if the directory does not yet > exists > > I have already created a fix and added a Testcase for better debugging (but > the Testcase does not reproduce the error because it would remove the > permission for the current user and afterwards your need root rights to > delete the Testdirectory again. Not suitable pipeline builds) > [https://github.com/michael-salzburg/camel] > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-19615) camel-ftp
[ https://issues.apache.org/jira/browse/CAMEL-19615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744471#comment-17744471 ] Michael Rambichler commented on CAMEL-19615: If OK i can push my current fork into the branch. > camel-ftp > - > > Key: CAMEL-19615 > URL: https://issues.apache.org/jira/browse/CAMEL-19615 > Project: Camel > Issue Type: Improvement > Components: camel-sftp >Affects Versions: 3.18.2 >Reporter: Michael Rambichler >Priority: Major > > We have a blocking issue with the current chmodDirectory option. > [https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_chmodDirectory] > > *Steps to reproduce:* > SFTP Directory: ../home/user/restricted/dir/subdir (where restricted e.g. > does not have change rights for the current user) > Component Call: > "sftp://localhost:21/home/user/restricted/dir/subdir/newDir"; + > "?username=admin&password=admin&chmod=777&chmodDirectory=770" > > *Behaviour:* > The current implementation steps down the directory and try to create each > junk. If the chmodDirectory option is set then i{color:#FF}t will try for > each (already existing junk) to change the directory permission and > fails.{color} > > *Expected Behaviour:* > It should only try to change the permission if the directory does not yet > exists > > I have already created a fix and added a Testcase for better debugging (but > the Testcase does not reproduce the error because it would remove the > permission for the current user and afterwards your need root rights to > delete the Testdirectory again. Not suitable pipeline builds) > [https://github.com/michael-salzburg/camel] > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CAMEL-19615) camel-ftp
Michael Rambichler created CAMEL-19615: -- Summary: camel-ftp Key: CAMEL-19615 URL: https://issues.apache.org/jira/browse/CAMEL-19615 Project: Camel Issue Type: Improvement Components: camel-sftp Affects Versions: 3.18.2 Reporter: Michael Rambichler We have a blocking issue with the current chmodDirectory option. [https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_chmodDirectory] *Steps to reproduce:* SFTP Directory: ../home/user/restricted/dir/subdir (where restricted e.g. does not have change rights for the current user) Component Call: "sftp://localhost:21/home/user/restricted/dir/subdir/newDir"; + "?username=admin&password=admin&chmod=777&chmodDirectory=770" *Behaviour:* The current implementation steps down the directory and try to create each junk. If the chmodDirectory option is set then i{color:#FF}t will try for each (already existing junk) to change the directory permission and fails.{color} *Expected Behaviour:* It should only try to change the permission if the directory does not yet exists I have already created a fix and added a Testcase for better debugging (but the Testcase does not reproduce the error because it would remove the permission for the current user and afterwards your need root rights to delete the Testdirectory again. Not suitable pipeline builds) [https://github.com/michael-salzburg/camel] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CAMEL-18683) Priorize RouteTemplate initialization
[ https://issues.apache.org/jira/browse/CAMEL-18683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-18683: --- Component/s: (was: came-core) camel-main > Priorize RouteTemplate initialization > - > > Key: CAMEL-18683 > URL: https://issues.apache.org/jira/browse/CAMEL-18683 > Project: Camel > Issue Type: Improvement > Components: camel-main >Reporter: Michael Rambichler >Priority: Minor > > We often struggle the issue of the correct Route naming order dependency: > > *Improvement:* Priorize RouteBuilder with RouteTemplates > *Testcase:* > Name your RouteTemplate: ZTemplate > and another Routebuilder which will use the defined Template in ZTemplate. > The Routebuilder will fail because the ZTemplate Route was not yet added to > the routescollections. > *Suggestion:* Use a dedicated class e.g. RouteTemplateBuilder to prioritize > Routebuilder with templates > See: RoutesConfigure.java > private void addDiscoveredRoutes(CamelContext camelContext, > List routes) throws Exception { > // sort routes according to ordered > routes.sort(OrderedComparator.get()); > // first add the routes configurations as they are globally for all routes > for (RoutesBuilder builder : routes) { > if (builder instanceof RouteConfigurationsBuilder) { > RouteConfigurationsBuilder rcb = (RouteConfigurationsBuilder) > builder; > LOG.debug("Adding routes configurations into CamelContext from > RouteConfigurationsBuilder: {}", rcb); > camelContext.addRoutesConfigurations(rcb); > } > } > {color:#ff} // first add the all route templates as they are globally for > all routes > for (RoutesBuilder builder : routes) { > if (builder instanceof RouteTemplateBuilder) { > LOG.debug("Adding route tempaltes into CamelContext from RoutesBuilder: > {}", builder); > camelContext.addRoutes(builder); > } > }{color} > // then add the routes > for (RoutesBuilder builder : routes) { > LOG.debug("Adding routes into CamelContext from RoutesBuilder: {}", > builder); > camelContext.addRoutes(builder); > } > } > } -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CAMEL-18683) Priorize RouteTemplate initialization
Michael Rambichler created CAMEL-18683: -- Summary: Priorize RouteTemplate initialization Key: CAMEL-18683 URL: https://issues.apache.org/jira/browse/CAMEL-18683 Project: Camel Issue Type: Improvement Components: came-core Reporter: Michael Rambichler We often struggle the issue of the correct Route naming order dependency: *Improvement:* Priorize RouteBuilder with RouteTemplates *Testcase:* Name your RouteTemplate: ZTemplate and another Routebuilder which will use the defined Template in ZTemplate. The Routebuilder will fail because the ZTemplate Route was not yet added to the routescollections. *Suggestion:* Use a dedicated class e.g. RouteTemplateBuilder to prioritize Routebuilder with templates See: RoutesConfigure.java private void addDiscoveredRoutes(CamelContext camelContext, List routes) throws Exception { // sort routes according to ordered routes.sort(OrderedComparator.get()); // first add the routes configurations as they are globally for all routes for (RoutesBuilder builder : routes) { if (builder instanceof RouteConfigurationsBuilder) { RouteConfigurationsBuilder rcb = (RouteConfigurationsBuilder) builder; LOG.debug("Adding routes configurations into CamelContext from RouteConfigurationsBuilder: {}", rcb); camelContext.addRoutesConfigurations(rcb); } } {color:#ff} // first add the all route templates as they are globally for all routes for (RoutesBuilder builder : routes) { if (builder instanceof RouteTemplateBuilder) { LOG.debug("Adding route tempaltes into CamelContext from RoutesBuilder: {}", builder); camelContext.addRoutes(builder); } }{color} // then add the routes for (RoutesBuilder builder : routes) { LOG.debug("Adding routes into CamelContext from RoutesBuilder: {}", builder); camelContext.addRoutes(builder); } } } -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-18255) Memory Leak with MDCUnitOfWork
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563253#comment-17563253 ] Michael Rambichler commented on CAMEL-18255: Great [~klease78] for this analysis. I got stucked in debugging at exactly your position. > Memory Leak with MDCUnitOfWork > -- > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Minor > Fix For: 3.x > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() > { return true; } > @Override public String next() > { return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CAMEL-18255) Memory Leak with MDCUnitOfWork
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561919#comment-17561919 ] Michael Rambichler edited comment on CAMEL-18255 at 7/3/22 6:25 PM: Hi [~davsclaus] The issue is quite independent of MDC. See my example in [https://github.com/michael-salzburg/splitMemoryTest.git] I spend some time to analyse it further: If you override the method of the DefaultUnitOfWork or MDCUnitOfWork and return {color:#de350b}true{color}: Then the Memory Leak occurs. @Override public boolean isBeforeAfterProcess() { {color:#de350b}return true; //like its set e.g. in MDCUnitOfWork{color} } The current MDCUnitOfWork returns true in this case. But i wasn't able to analyse the impact in deep of this change, yet. Btw. You mentioned MDC is low prio/candidate for dprecation: We use MDC logging of especially the breadcrumbId heavily in our system. That would have major impact in our environment. was (Author: rambichler): Hi [~davsclaus] The issue is quite independent of MDC. See my example in [https://github.com/michael-salzburg/splitMemoryTest.git] I spend some time to analyse it further: If you override the method of the DefaultUnitOfWork or MDCUnitOfWork and return {color:#de350b}true{color}: Then the Memory Leak occurs. (Event the @Override public boolean isBeforeAfterProcess() { {color:#de350b}return true; //like its set e.g. in MDCUnitOfWork{color} } The current MDCUnitOfWork returns true in this case. But i wasn't able to analyse the impact in deep of this change, yet. Btw. You mentioned MDC is low prio/candidate for dprecation: We use MDC logging of especially the breadcrumbId heavily in our system. That would have major impact in our environment. > Memory Leak with MDCUnitOfWork > -- > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Minor > Fix For: 3.x > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() > { return true; } > @Override public String next() > { return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-18255) Memory Leak with MDCUnitOfWork
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561919#comment-17561919 ] Michael Rambichler commented on CAMEL-18255: Hi [~davsclaus] The issue is quite independent of MDC. See my example in [https://github.com/michael-salzburg/splitMemoryTest.git] I spend some time to analyse it further: If you override the method of the DefaultUnitOfWork or MDCUnitOfWork and return {color:#de350b}true{color}: Then the Memory Leak occurs. (Event the @Override public boolean isBeforeAfterProcess() { {color:#de350b}return true; //like its set e.g. in MDCUnitOfWork{color} } The current MDCUnitOfWork returns true in this case. But i wasn't able to analyse the impact in deep of this change, yet. Btw. You mentioned MDC is low prio/candidate for dprecation: We use MDC logging of especially the breadcrumbId heavily in our system. That would have major impact in our environment. > Memory Leak with MDCUnitOfWork > -- > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Minor > Fix For: 3.x > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() > { return true; } > @Override public String next() > { return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CAMEL-18255) Memory Leak with MDCUnitOfWork
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-18255: --- Description: We realized a sever memory leak in a standard route: I reproduced it and made a simple MemoryAllocation Check. Just for curiosity i made another test with: ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak does not occure. Sample route to reproduce: from("scheduler:testScheduler?repeatCount=1") .log("Starting route test-route") .process(exchange -> { Iterator infiniteIter = new Iterator<>() { private int integer = 0; @Override public boolean hasNext() { return true; } @Override public String next() { return String.valueOf(integer++); } }; exchange.getMessage().setBody(infiniteIter); }) .split().body().streaming() .log("inside split: ${body}") .end() .log("test-route never finishes"); was: We realized a sever memory leak in a standard route: I reproduced it and made a simple MemoryAllocation Check. Then I realized the usage of RetryErrorHandler Just for curiosity i made another test with: ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak does not occure. Sample route to reproduce: from("scheduler:testScheduler?repeatCount=1") .log("Starting route test-route") .process(exchange -> { Iterator infiniteIter = new Iterator<>() { private int integer = 0; @Override public boolean hasNext() { return true; } @Override public String next() { return String.valueOf(integer++); } }; exchange.getMessage().setBody(infiniteIter); }) .split().body().streaming() .log("inside split: ${body}") .end() .log("test-route never finishes"); > Memory Leak with MDCUnitOfWork > -- > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Minor > Fix For: 3.x > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() > { return true; } > @Override public String next() > { return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CAMEL-18255) Memory Leak with MDCUnitOfWork
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-18255: --- Summary: Memory Leak with MDCUnitOfWork (was: Memory Leak with default Route and MDC-logging (which includes RetryErrorHandler)) > Memory Leak with MDCUnitOfWork > -- > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Minor > Fix For: 3.x > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Then I realized the usage of RetryErrorHandler > > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() { > return true; > } > @Override public String next() { > return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CAMEL-18255) Memory Leak with default Route and MDC-logging (which includes RetryErrorHandler)
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-18255: --- Summary: Memory Leak with default Route and MDC-logging (which includes RetryErrorHandler) (was: Memory Leak with default Route (which includes RetryErrorHandler)) > Memory Leak with default Route and MDC-logging (which includes > RetryErrorHandler) > - > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Major > Fix For: 3.19.0 > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Then I realized the usage of RetryErrorHandler > > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() { > return true; > } > @Override public String next() { > return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-18255: --- Attachment: screenshot-1.png > Memory Leak with default Route (which includes RetryErrorHandler) > - > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Major > Fix For: 3.19.0 > > Attachments: Screenshot 2022-07-01 at 19.30.44.png, screenshot-1.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Then I realized the usage of RetryErrorHandler > > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() { > return true; > } > @Override public String next() { > return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561592#comment-17561592 ] Michael Rambichler commented on CAMEL-18255: I have added a example project in github: [https://github.com/michael-salzburg/splitMemoryTest.git] The issue is the mdc logging: {color:#FF}camel.springboot.use-mdc-logging=true{color} Without: Memory Consumption around 100MB. with mdc-logging=true Consumption goes up till END. GC does not work. > Memory Leak with default Route (which includes RetryErrorHandler) > - > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Major > Fix For: 3.19.0 > > Attachments: Screenshot 2022-07-01 at 19.30.44.png > > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Then I realized the usage of RetryErrorHandler > > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() { > return true; > } > @Override public String next() { > return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)
[ https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-18255: --- Component/s: camel-core (was: came-core) > Memory Leak with default Route (which includes RetryErrorHandler) > - > > Key: CAMEL-18255 > URL: https://issues.apache.org/jira/browse/CAMEL-18255 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.14.1, 3.17.0 >Reporter: Michael Rambichler >Priority: Critical > > We realized a sever memory leak in a standard route: > > I reproduced it and made a simple MemoryAllocation Check. > Then I realized the usage of RetryErrorHandler > > Just for curiosity i made another test with: > ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak > does not occure. > > Sample route to reproduce: > > from("scheduler:testScheduler?repeatCount=1") > .log("Starting route test-route") > .process(exchange -> { > Iterator infiniteIter = new Iterator<>() { > private int integer = 0; > > @Override public boolean hasNext() { > return true; > } > @Override public String next() { > return String.valueOf(integer++); > } > }; > exchange.getMessage().setBody(infiniteIter); > }) > .split().body().streaming() > .log("inside split: ${body}") > .end() > .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)
Michael Rambichler created CAMEL-18255: -- Summary: Memory Leak with default Route (which includes RetryErrorHandler) Key: CAMEL-18255 URL: https://issues.apache.org/jira/browse/CAMEL-18255 Project: Camel Issue Type: Bug Components: came-core Affects Versions: 3.17.0, 3.14.1 Reporter: Michael Rambichler We realized a sever memory leak in a standard route: I reproduced it and made a simple MemoryAllocation Check. Then I realized the usage of RetryErrorHandler Just for curiosity i made another test with: ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak does not occure. Sample route to reproduce: from("scheduler:testScheduler?repeatCount=1") .log("Starting route test-route") .process(exchange -> { Iterator infiniteIter = new Iterator<>() { private int integer = 0; @Override public boolean hasNext() { return true; } @Override public String next() { return String.valueOf(integer++); } }; exchange.getMessage().setBody(infiniteIter); }) .split().body().streaming() .log("inside split: ${body}") .end() .log("test-route never finishes"); -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CAMEL-18169) setException as for Camel DSL
Michael Rambichler created CAMEL-18169: -- Summary: setException as for Camel DSL Key: CAMEL-18169 URL: https://issues.apache.org/jira/browse/CAMEL-18169 Project: Camel Issue Type: New Feature Components: came-core Reporter: Michael Rambichler For convinience I would like to have camel dsl extended with following method: *.setException(..)* Then the following example would be one liner. *Example:* .doTry() // try something .endDoTry() doCatch(Exception.class) // Set the exception after our compensation logic is performed in order for the route error handler to kick in. .process(exchange -> { Exception exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); if (exception != null) { exchange.setException(exception); } }) .end(); -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] (CAMEL-17492) CamelBeanPostProcessor fails if @Producer is used in EventNotifier
[ https://issues.apache.org/jira/browse/CAMEL-17492 ] Michael Rambichler deleted comment on CAMEL-17492: was (Author: rambichler): Hi [~davsclaus] the NPE is fixed. But CamelContext Autoconfigure does not spin ab the SPI ServiceEventNotifier bean. Can you please reopen the bug. > CamelBeanPostProcessor fails if @Producer is used in EventNotifier > -- > > Key: CAMEL-17492 > URL: https://issues.apache.org/jira/browse/CAMEL-17492 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-spring-boot >Affects Versions: 3.12.0, 3.13.0, 3.14.0 >Reporter: Michael Rambichler >Assignee: Claus Ibsen >Priority: Minor > Fix For: 3.14.1, 3.15.0 > > > If you use a @Produce annotation in an EventNotifier Camel fails at startup. > *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot > Routebuilder. > I have reproduced it with the spring boot example: > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > > Fails since Camel > 3.11 > > Initialization of bean failed; nested exception is > org.springframework.beans.factory.BeanCreationException: Error post > processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > > Caused by: org.springframework.beans.factory.BeanCreationException: Error > post processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > at > org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) > ~[camel-spring-3.14.0.jar:3.14.0] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) > ~[spring-beans-5.3.14.jar:5.3.14] > ... 122 common frames omitted > > > *Example* > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > {{TestEventNotifier.java}} > > {{@Component}} > {{public class TestEventNotifier extends EventNotifierSupport {}} > {{ @Produce("stream:out")}} > {{ TestProducer producer;}} > {{ @Override}} > {{ public void notify(CamelEvent event) throws Exception {}} > {{ System.err.println(event);}} > {{ //producer.publish("some notification");}} > {{ }}} > {{}}} > {{---}} > {{TestProducer.java:}} > {{import org.apache.camel.InOnly;}} > {{@InOnly}} > {{public interface TestProducer {}} > {{ void publish(String event);}} > {{}}} > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (CAMEL-17492) CamelBeanPostProcessor fails if @Producer is used in EventNotifier
[ https://issues.apache.org/jira/browse/CAMEL-17492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17483612#comment-17483612 ] Michael Rambichler commented on CAMEL-17492: Hi [~davsclaus] the NPE is fixed. But CamelContext Autoconfigure does not spin ab the SPI ServiceEventNotifier bean. Can you please reopen the bug. > CamelBeanPostProcessor fails if @Producer is used in EventNotifier > -- > > Key: CAMEL-17492 > URL: https://issues.apache.org/jira/browse/CAMEL-17492 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-spring-boot >Affects Versions: 3.12.0, 3.13.0, 3.14.0 >Reporter: Michael Rambichler >Assignee: Claus Ibsen >Priority: Minor > Fix For: 3.14.1, 3.15.0 > > > If you use a @Produce annotation in an EventNotifier Camel fails at startup. > *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot > Routebuilder. > I have reproduced it with the spring boot example: > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > > Fails since Camel > 3.11 > > Initialization of bean failed; nested exception is > org.springframework.beans.factory.BeanCreationException: Error post > processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > > Caused by: org.springframework.beans.factory.BeanCreationException: Error > post processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > at > org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) > ~[camel-spring-3.14.0.jar:3.14.0] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) > ~[spring-beans-5.3.14.jar:5.3.14] > ... 122 common frames omitted > > > *Example* > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > {{TestEventNotifier.java}} > > {{@Component}} > {{public class TestEventNotifier extends EventNotifierSupport {}} > {{ @Produce("stream:out")}} > {{ TestProducer producer;}} > {{ @Override}} > {{ public void notify(CamelEvent event) throws Exception {}} > {{ System.err.println(event);}} > {{ //producer.publish("some notification");}} > {{ }}} > {{}}} > {{---}} > {{TestProducer.java:}} > {{import org.apache.camel.InOnly;}} > {{@InOnly}} > {{public interface TestProducer {}} > {{ void publish(String event);}} > {{}}} > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Created] (CAMEL-17514) BreadcrumbId MDC Value not set even MDCLogging is true during ErrorHandling Processor
Michael Rambichler created CAMEL-17514: -- Summary: BreadcrumbId MDC Value not set even MDCLogging is true during ErrorHandling Processor Key: CAMEL-17514 URL: https://issues.apache.org/jira/browse/CAMEL-17514 Project: Camel Issue Type: Bug Components: camel-core, camel-spring-boot Affects Versions: 3.14.0, 3.13.0 Reporter: Michael Rambichler *Expected Behaviour:* If UseMDCLogging=true and UseBreadcrumb=true is set then i expect then everywhere the MDC Value camel.breadcrumbId is set. like it works in Camel Version < 3.12 *Reproducable* *Camel Version > 3.11* Hint: If I use a custom UnitOfWorkFactory it works as expected. But I would assume that If MDCLogging is enabled then the DefaultUnitOfWork would handle this. *Log without MDC camel.Breadcrumb:* 2022-01-19 12:01:00,335 INFO [1 - timer://foo] route1 [route1 0141fbc5-bb47-4458-a982-1e6585109b8a] - Received exchange with breadcrumbID: 0141fbc5-bb47-4458-a982-1e6585109b8a 2022-01-19 12:01:00,337 INFO [1 - timer://foo] c.t.a.r.h.HelloBreadcrumbRoute [route1 0141fbc5-bb47-4458-a982-1e6585109b8a] - Process with bug 2022-01-19 12:01:00,338 INFO [1 - timer://foo] c.t.a.r.h.OnExceptionProcessor [{color:#FF}breadcrumbMissing{color}] - Some OnException process 2022-01-19 12:01:00,344 INFO [1 - timer://foo] route2 [route2 {color:#FF}breadcrumbMissing{color}] - Deadletter receive *Example:* @Override public void configure() throws Exception { getContext().setUseMDCLogging(true); getContext().setUseBreadcrumb(true); DeadLetterChannelBuilder errorHandlerBuilder = new DeadLetterChannelBuilder(); errorHandlerBuilder.setDeadLetterUri("direct:deadletterTest"); errorHandlerBuilder.setOnExceptionOccurred(onExceptionProcessor); errorHandler(errorHandlerBuilder); from("timer://foo?fixedRate=true&period=1") .log("Received exchange with breadcrumbID: ${in.headers.breadcrumbId}") .process(exchange -> { throw new Exception("Some Bug"); }); from("direct:deadletterTest") .log("Deadletter received ${body}"); } *OnExceptionProcessor:* @Component public class OnExceptionProcessor implements Processor { private static final Logger LOG = LoggerFactory.getLogger(OnExceptionProcessor.class); @Override public void process(Exchange exchange) throws Exception { LOG.info("Some OnException process"); } } -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (CAMEL-17492) CamelBeanPostProcessor fails if @Producer is used in EventNotifier
[ https://issues.apache.org/jira/browse/CAMEL-17492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476345#comment-17476345 ] Michael Rambichler commented on CAMEL-17492: [~davsclaus] i suppose so. But what change between 3.11 -> 3.12 leads to that. spring version is the same. > CamelBeanPostProcessor fails if @Producer is used in EventNotifier > -- > > Key: CAMEL-17492 > URL: https://issues.apache.org/jira/browse/CAMEL-17492 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-spring-boot >Affects Versions: 3.12.0, 3.13.0, 3.14.0 >Reporter: Michael Rambichler >Priority: Minor > Fix For: 3.15.0 > > > If you use a @Produce annotation in an EventNotifier Camel fails at startup. > *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot > Routebuilder. > I have reproduced it with the spring boot example: > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > > Fails since Camel > 3.11 > > Initialization of bean failed; nested exception is > org.springframework.beans.factory.BeanCreationException: Error post > processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > > Caused by: org.springframework.beans.factory.BeanCreationException: Error > post processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > at > org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) > ~[camel-spring-3.14.0.jar:3.14.0] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) > ~[spring-beans-5.3.14.jar:5.3.14] > ... 122 common frames omitted > > > *Example* > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > {{TestEventNotifier.java}} > > {{@Component}} > {{public class TestEventNotifier extends EventNotifierSupport {}} > {{ @Produce("stream:out")}} > {{ TestProducer producer;}} > {{ @Override}} > {{ public void notify(CamelEvent event) throws Exception {}} > {{ System.err.println(event);}} > {{ //producer.publish("some notification");}} > {{ }}} > {{}}} > {{---}} > {{TestProducer.java:}} > {{import org.apache.camel.InOnly;}} > {{@InOnly}} > {{public interface TestProducer {}} > {{ void publish(String event);}} > {{}}} > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Updated] (CAMEL-17492) CamelBeanPostProcessor fails if @Producer is used in EventNotifier
[ https://issues.apache.org/jira/browse/CAMEL-17492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-17492: --- Description: If you use a @Produce annotation in an EventNotifier Camel fails at startup. *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot Routebuilder. I have reproduced it with the spring boot example: [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] and added the EventNotifier below. Fails since Camel > 3.11 Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error post processing bean: testEventNotifier; nested exception is java.lang.NullPointerException Caused by: org.springframework.beans.factory.BeanCreationException: Error post processing bean: testEventNotifier; nested exception is java.lang.NullPointerException at org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) ~[camel-spring-3.14.0.jar:3.14.0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.14.jar:5.3.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.14.jar:5.3.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.14.jar:5.3.14] ... 122 common frames omitted *Example* [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] and added the EventNotifier below. {{TestEventNotifier.java}} {{@Component}} {{public class TestEventNotifier extends EventNotifierSupport {}} {{ @Produce("stream:out")}} {{ TestProducer producer;}} {{ @Override}} {{ public void notify(CamelEvent event) throws Exception {}} {{ System.err.println(event);}} {{ //producer.publish("some notification");}} {{ }}} {{}}} {{---}} {{TestProducer.java:}} {{import org.apache.camel.InOnly;}} {{@InOnly}} {{public interface TestProducer {}} {{ void publish(String event);}} {{}}} was: If you use a @Produce annotation in an EventNotifier Camel fails at startup. *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot Routebuilder. I have reproduced it with the spring boot example: [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] and added the EventNotifier below. Fails since Camel > 3.11 Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error post processing bean: testEventNotifier; nested exception is java.lang.NullPointerException Caused by: org.springframework.beans.factory.BeanCreationException: Error post processing bean: testEventNotifier; nested exception is java.lang.NullPointerException at org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) ~[camel-spring-3.14.0.jar:3.14.0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.14.jar:5.3.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.14.jar:5.3.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.14.jar:5.3.14] ... 122 common frames omitted > CamelBeanPostProcessor fails if @Producer is used in EventNotifier > -- > > Key: CAMEL-17492 > URL: https://issues.apache.org/jira/browse/CAMEL-17492 > Project: Camel > Issue Type: Bug >Affects Versions: 3.12.0, 3.13.0, 3.14.0 >Reporter: Michael Rambichler >Priority: Major > > If you use a @Produce annotation in an EventNotifier Camel fails at startup. > *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot > Routebuilder. > I have reproduced it with the spring boot example: > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > > Fails since Camel > 3.11 > > Initialization of bean failed; nested exception is > org.springframework.beans.factory.BeanCreationException: Error post > processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > > Caused by: org.springframework.beans.factory.BeanCreationException: Error
[jira] [Updated] (CAMEL-17492) CamelBeanPostProcessor fails if @Producer is used in EventNotifier
[ https://issues.apache.org/jira/browse/CAMEL-17492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Rambichler updated CAMEL-17492: --- Environment: (was: {{TestEventNotifier.java}} {{@Component}} {{public class TestEventNotifier extends EventNotifierSupport {}} {{ @Produce("stream:out")}} {{ TestProducer producer;}} {{ @Override}} {{ public void notify(CamelEvent event) throws Exception {}} {{ System.err.println(event);}} {{ //producer.publish("some notification");}} {{ }}} {{}}} {{---}} {{TestProducer.java:}} {{import org.apache.camel.InOnly;}} {{@InOnly}} {{public interface TestProducer {}} {{ void publish(String event);}} {{}}}) > CamelBeanPostProcessor fails if @Producer is used in EventNotifier > -- > > Key: CAMEL-17492 > URL: https://issues.apache.org/jira/browse/CAMEL-17492 > Project: Camel > Issue Type: Bug >Affects Versions: 3.12.0, 3.13.0, 3.14.0 >Reporter: Michael Rambichler >Priority: Major > > If you use a @Produce annotation in an EventNotifier Camel fails at startup. > *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot > Routebuilder. > I have reproduced it with the spring boot example: > [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] > and added the EventNotifier below. > > Fails since Camel > 3.11 > > Initialization of bean failed; nested exception is > org.springframework.beans.factory.BeanCreationException: Error post > processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > > Caused by: org.springframework.beans.factory.BeanCreationException: Error > post processing bean: testEventNotifier; nested exception is > java.lang.NullPointerException > at > org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) > ~[camel-spring-3.14.0.jar:3.14.0] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) > ~[spring-beans-5.3.14.jar:5.3.14] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) > ~[spring-beans-5.3.14.jar:5.3.14] > ... 122 common frames omitted -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Created] (CAMEL-17492) CamelBeanPostProcessor fails if @Producer is used in EventNotifier
Michael Rambichler created CAMEL-17492: -- Summary: CamelBeanPostProcessor fails if @Producer is used in EventNotifier Key: CAMEL-17492 URL: https://issues.apache.org/jira/browse/CAMEL-17492 Project: Camel Issue Type: Bug Affects Versions: 3.14.0, 3.13.0, 3.12.0 Environment: {{TestEventNotifier.java}} {{@Component}} {{public class TestEventNotifier extends EventNotifierSupport {}} {{ @Produce("stream:out")}} {{ TestProducer producer;}} {{ @Override}} {{ public void notify(CamelEvent event) throws Exception {}} {{ System.err.println(event);}} {{ //producer.publish("some notification");}} {{ }}} {{}}} {{---}} {{TestProducer.java:}} {{import org.apache.camel.InOnly;}} {{@InOnly}} {{public interface TestProducer {}} {{ void publish(String event);}} {{}}} Reporter: Michael Rambichler If you use a @Produce annotation in an EventNotifier Camel fails at startup. *Reproducable with:* Custom EventNotifier in a plain Camel + Springboot Routebuilder. I have reproduced it with the spring boot example: [https://github.com/apache/camel-spring-boot-examples/tree/main/spring-boot] and added the EventNotifier below. Fails since Camel > 3.11 Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error post processing bean: testEventNotifier; nested exception is java.lang.NullPointerException Caused by: org.springframework.beans.factory.BeanCreationException: Error post processing bean: testEventNotifier; nested exception is java.lang.NullPointerException at org.apache.camel.spring.spi.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:160) ~[camel-spring-3.14.0.jar:3.14.0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.14.jar:5.3.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.14.jar:5.3.14] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.14.jar:5.3.14] ... 122 common frames omitted -- This message was sent by Atlassian Jira (v8.20.1#820001)
[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)
[jira] [Commented] (CAMEL-17037) camel-ftp chmodDirectory in SFTP component
[ https://issues.apache.org/jira/browse/CAMEL-17037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17423577#comment-17423577 ] Michael Rambichler commented on CAMEL-17037: I am going to take a look on this. If successfull create a pull request > camel-ftp chmodDirectory in SFTP component > -- > > Key: CAMEL-17037 > URL: https://issues.apache.org/jira/browse/CAMEL-17037 > Project: Camel > Issue Type: New Feature > Components: camel-ftp >Reporter: Michael Rambichler >Priority: Minor > > The SFTP component does not support the chmodDirectory parameter. (like the > file-component > [https://camel.apache.org/components/3.11.x/file-component.html]) > The sftp api as able to set the permission on directory. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CAMEL-17037) camel-ftp chmodDirectory in SFTP component
Michael Rambichler created CAMEL-17037: -- Summary: camel-ftp chmodDirectory in SFTP component Key: CAMEL-17037 URL: https://issues.apache.org/jira/browse/CAMEL-17037 Project: Camel Issue Type: New Feature Components: camel-ftp Reporter: Michael Rambichler The SFTP component does not support the chmodDirectory parameter. (like the file-component [https://camel.apache.org/components/3.11.x/file-component.html]) The sftp api as able to set the permission on directory. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CAMEL-16895) Log masking results in stackoverflow for large inputs
[ https://issues.apache.org/jira/browse/CAMEL-16895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17414063#comment-17414063 ] Michael Rambichler commented on CAMEL-16895: Hi [~davsclaus] / Hi community. Is there any chance to backport this patch into a 3.11.x *LTS* Release? We use .log("${body}") within several routes but did not plan to use non LTS versions in our project. > Log masking results in stackoverflow for large inputs > - > > Key: CAMEL-16895 > URL: https://issues.apache.org/jira/browse/CAMEL-16895 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 3.11.0 >Reporter: Julius Krah >Assignee: Claus Ibsen >Priority: Minor > Fix For: 3.12.0 > > > When a fairly large input string is submitted for logging and masking is > enabled, this results in a StackoverflowError > > Using camel with Spring Boot > pom.xml > {noformat} > > > > org.apache.camel.springboot > camel-spring-boot-bom > 3.11.1 > pom > import > > > > > > org.springframework.boot > spring-boot-starter-validation > > > org.apache.camel.springboot > camel-spring-boot-starter > > {noformat} > Route.java > {noformat} > @Component > public class Route extends RouteBuilder { > @Override > public void configure() throws Exception { > from("rabbitmq:{{core.consumer.rabbitmq.exchange}}" + > "?exchangeType={{core.consumer.rabbitmq.exchange-type}}" + > "&queue={{core.consumer.rabbitmq.queue}}" + > "&routingKey={{core.consumer.rabbitmq.routing-key}}") > .routeId("queue route") > .log("Received payload from rabbitMQ: ${body}") > .unmarshal(new JacksonDataFormat(Dto.class)) > .process(aProcessor) > .log("Data received ${body}") > > .to("bean:requestProcessor?method=handleAckRequest").id("handle-ack-request") > > .to("direct:anotherRoute") > .end(); > } > } > {noformat} > In the application.properties > *camel.springboot.log-mask=true* > > Now if I should post the following JSON payload through RabbitMQ > > {noformat} > { > "qwjabrlanfssaPaymentID": 93974430, > "apiPortNumber": 0, > "pollerFrequency": 0, > "serviceCode": "QWERETEMKLJLANDD", > "extraData": { > "97280991": { > "pushToOriginator": true, > "uidID": 41189716, > "metaData": [ > { > "Value": 1070, > "Name": "Amount" > }, > { > "Value": "PHP82TK6MY", >"Name": "MpesaQwasdrtjknsNumber" > }, > { > "Name": "Balance" > }, > { > "Value": 20210825224512, > "Name": "TransactionDate" > }, > { > "Value": 599726145860, > "Name": "PhoneNumber" > }], > "pokjytsAmountCharged": 1070, > "hardwareRequestId": null, > "ProductCode": "UJHANSNLWII", > "isTillNumber": true, > "uniqueID": "83859103", > "vouchercode": " ", > "paybillNumber": "431553" > } > }, > "oiusdftrPaymentStatus": 139, > "serviceUrl": "", > "lkjmnbsdcvfdertCurrencyCode": "YUM", > "wrapperUrl": "", > "wsdlFile": "", > "protocol": "default", > "sslEnabled": 0, > "numberOfSends": 0, > "invoiceNumber": "", > "erdfghytIsdgftgDate": "2021-08-25 22:45:20", > "lkjditgfJhsgruaCustomerName": "Customer", > "apiUserName": "", > "ojudhfgKaswsxsUUID": "1102967588", > "iuytredfHsdededAccountNumber": "4622785548", > "tyghfderrMode": [ > "TUND_PUDF" > ], > "zxcvfgtrNsdfdfdMSISDN": "254726173860", > "apiFunctionName": "", > "kjhxcTransactionID": [ > "PHP82TK6MY" > ], > "apiPassword": "x", > "kjhcvbnUUID": "1102967588", > "dfcxvbnClientCode": [ > "SAFKE" > ], > "sslCertificatePath": "", > "isTokenService": 0, > "wsazxcvgbgthyujAmount": 1070, > "plsjdhfhPusherProcessorClass": "", > "requestOriginIDs": [ > "21" > ], > "firstSend": "", >