[jira] [Updated] (CAMEL-10545) Canot start DefaultCamelContext
[ https://issues.apache.org/jira/browse/CAMEL-10545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ben Cheng updated CAMEL-10545: -- Description: I simply create DefaultCamelContext and start. public class Appl { public static void main(String[] args) throws Exception{ CamelContext context = new DefaultCamelContext(); context.start(); } } It throws exception: Exception in thread "main" java.lang.UnsupportedOperationException at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185) at java.util.Collections.sort(Collections.java:234) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3525) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3308) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3162) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920) at com.techoffice.example.Appl.main(Appl.java:18) If I tested with version: 2.14.4, every thing works fine. was: I simply create DefaultCamelContext and start. public class Appl { public static void main(String[] args) throws Exception{ CamelContext context = new DefaultCamelContext(); context.start(); } } It throws exception: Exception in thread "main" java.lang.UnsupportedOperationException at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185) at java.util.Collections.sort(Collections.java:234) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3525) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3308) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3162) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920) at com.techoffice.example.Appl.main(Appl.java:18) > Canot start DefaultCamelContext > --- > > Key: CAMEL-10545 > URL: https://issues.apache.org/jira/browse/CAMEL-10545 > Project: Camel > Issue Type: Bug > Components: camel-core >Affects Versions: 2.18.0 >Reporter: Ben Cheng > > I simply create DefaultCamelContext and start. > public class Appl { > public static void main(String[] args) throws Exception{ > CamelContext context = new DefaultCamelContext(); > context.start(); > } > } > It throws exception: > Exception in thread "main" java.lang.UnsupportedOperationException > at > java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185) > at java.util.Collections.sort(Collections.java:234) > at > org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3525) > at > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3308) > at > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3162) > at > org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182) > at > org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957) > at > org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953) > at > org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976) > at > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953) > at
[jira] [Created] (CAMEL-10545) Canot start DefaultCamelContext
Ben Cheng created CAMEL-10545: - Summary: Canot start DefaultCamelContext Key: CAMEL-10545 URL: https://issues.apache.org/jira/browse/CAMEL-10545 Project: Camel Issue Type: Bug Components: camel-core Affects Versions: 2.18.0 Reporter: Ben Cheng I simply create DefaultCamelContext and start. public class Appl { public static void main(String[] args) throws Exception{ CamelContext context = new DefaultCamelContext(); context.start(); } } It throws exception: Exception in thread "main" java.lang.UnsupportedOperationException at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185) at java.util.Collections.sort(Collections.java:234) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3525) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3308) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3162) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:182) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2957) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2953) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2976) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2953) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2920) at com.techoffice.example.Appl.main(Appl.java:18) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10509) ManagedCamelContextMBean - additional namespaces are removed
[ https://issues.apache.org/jira/browse/CAMEL-10509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15706383#comment-15706383 ] ASF GitHub Bot commented on CAMEL-10509: Github user jamesnetherton closed the pull request at: https://github.com/apache/camel/pull/1318 > ManagedCamelContextMBean - additional namespaces are removed > > > Key: CAMEL-10509 > URL: https://issues.apache.org/jira/browse/CAMEL-10509 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.18.0 >Reporter: Aurelien Pupier >Assignee: James Netherton > Fix For: 2.18.2, 2.19.0 > > > - Use a specific namespace, declared at CamelContext level, in an Xpath > expression of a When > something like: > {noformat} > http://www.osgi.org/xmlns/blueprint/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd > http://camel.apache.org/schema/blueprint > http://camel.apache.org/schema/blueprint/camel-blueprint.xsd;> > > xmlns="http://camel.apache.org/schema/blueprint; > xmlns:order="http://fabric8.com/examples/order/v7;> > > > > > > > id="_xpath1">/order:order/order:customer/order:country = 'UK' > > > > > id="_xpath2">/order:order/order:customer/order:country = 'US' > > > > > > > > > > > > > {noformat} > - Deploy the project > - Using MBean retrieve dumpRoutesAsXml is providing a route without the > additional xml namespace provided > xmlns:order="http://fabric8.com/examples/order/v7; > {noformat} > > xmlns="http://camel.apache.org/schema/spring;> > > > > > > /order:order/order:customer/order:country > = 'UK' > > > > > /order:order/order:customer/order:country > = 'US' > > > > > > uri="file:work/cbr/output/others"/> > > > > > > {noformat} > - Then use addOrUpdateRoutesFromXml to upload the exact same xml, you will > get exceptions when the When code is invoked: > {noformat} > Message History > --- > RouteId ProcessorId Processor > Elapsed (ms) > [cbr-route ] [cbr-route ] [file://work/cbr/input >] [ 1] > [cbr-route ] [_log1 ] [log >] [ 0] > [cbr-route ] [_choice1 ] [when[xpath{XPath: > /order:order/order:customer/order:country = 'UK'}]choice[whe] [ 1] > Stacktrace > --- > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: > /order:order/order:customer/order:country = 'UK'. Reason: > javax.xml.xpath.XPathExpressionException: > com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix > must resolve to a namespace: order > at > org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:769) > at > org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:155) > at > org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65) > at > org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at >
[jira] [Resolved] (CAMEL-10509) ManagedCamelContextMBean - additional namespaces are removed
[ https://issues.apache.org/jira/browse/CAMEL-10509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-10509. - Resolution: Fixed Fix Version/s: 2.18.2 > ManagedCamelContextMBean - additional namespaces are removed > > > Key: CAMEL-10509 > URL: https://issues.apache.org/jira/browse/CAMEL-10509 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.18.0 >Reporter: Aurelien Pupier >Assignee: James Netherton > Fix For: 2.18.2, 2.19.0 > > > - Use a specific namespace, declared at CamelContext level, in an Xpath > expression of a When > something like: > {noformat} > http://www.osgi.org/xmlns/blueprint/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd > http://camel.apache.org/schema/blueprint > http://camel.apache.org/schema/blueprint/camel-blueprint.xsd;> > > xmlns="http://camel.apache.org/schema/blueprint; > xmlns:order="http://fabric8.com/examples/order/v7;> > > > > > > > id="_xpath1">/order:order/order:customer/order:country = 'UK' > > > > > id="_xpath2">/order:order/order:customer/order:country = 'US' > > > > > > > > > > > > > {noformat} > - Deploy the project > - Using MBean retrieve dumpRoutesAsXml is providing a route without the > additional xml namespace provided > xmlns:order="http://fabric8.com/examples/order/v7; > {noformat} > > xmlns="http://camel.apache.org/schema/spring;> > > > > > > /order:order/order:customer/order:country > = 'UK' > > > > > /order:order/order:customer/order:country > = 'US' > > > > > > uri="file:work/cbr/output/others"/> > > > > > > {noformat} > - Then use addOrUpdateRoutesFromXml to upload the exact same xml, you will > get exceptions when the When code is invoked: > {noformat} > Message History > --- > RouteId ProcessorId Processor > Elapsed (ms) > [cbr-route ] [cbr-route ] [file://work/cbr/input >] [ 1] > [cbr-route ] [_log1 ] [log >] [ 0] > [cbr-route ] [_choice1 ] [when[xpath{XPath: > /order:order/order:customer/order:country = 'UK'}]choice[whe] [ 1] > Stacktrace > --- > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: > /order:order/order:customer/order:country = 'UK'. Reason: > javax.xml.xpath.XPathExpressionException: > com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix > must resolve to a namespace: order > at > org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:769) > at > org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:155) > at > org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65) > at > org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454) > at >
[jira] [Commented] (CAMEL-10391) Camel-CDI adds every RouteBuilder instance it can find to Camel context
[ https://issues.apache.org/jira/browse/CAMEL-10391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15706275#comment-15706275 ] ASF GitHub Bot commented on CAMEL-10391: Github user sverkera closed the pull request at: https://github.com/apache/camel/pull/1320 > Camel-CDI adds every RouteBuilder instance it can find to Camel context > --- > > Key: CAMEL-10391 > URL: https://issues.apache.org/jira/browse/CAMEL-10391 > Project: Camel > Issue Type: Improvement > Components: camel-cdi >Affects Versions: 2.18.0 > Environment: Wildfly 10 with wildfly-camel extension >Reporter: Sverker Abrahamsson >Assignee: Antonin Stefanutti > > Camel-CDI will find every class in a deployment which extends RouteBuilder > and automatically add them to the context. This is a major issue for me as I > usually wants to instantiate my RouteBuilders programatically setting various > parameters, with CDI support. > This behaviour was introduced with > https://github.com/apache/camel/commit/0421c24dfcf992f3296ed746469771e3800200e3 > from [~antonin.stefanutti] and we had a good discussion about the issue on > his github project in https://github.com/astefanutti/camel-cdi/issues/12 but > never came up with a good solution for it. I have patched camel-cdi to use a > marker annotation @DoNotAddToCamelContext to work around it but I don't want > to have to patch every release I use.. > I understand the logic why Camel-CDI finds and add every RouteBuilder class, > even though I don't agree that it is a good idea but it could very well be > the default behavior as long as it is possible to override it. > What I would like is a discussion on how this could be made configurable. I'm > thinking about if there could be an annotation like > @CamelContextStartup(false) or maybe even a more general > @CamelContextConfig(autostart=false) if there are other things that should be > configurable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10491) Spring-LDAP - Add support for authenticate, modify_attributes and function_driven operations
[ https://issues.apache.org/jira/browse/CAMEL-10491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15706271#comment-15706271 ] ASF GitHub Bot commented on CAMEL-10491: GitHub user bhaveshdt opened a pull request: https://github.com/apache/camel/pull/1321 CAMEL-10491 - Spring-LDAP - Utilizing java.util.function.BiFunction (Java 8) for FUNCTION_DRIVEN operation. You can merge this pull request into a Git repository by running: $ git pull https://github.com/bhaveshdt/camel java8 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/1321.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1321 commit 73cfad181fc324f3daedb2aab3d80991ca6f5c3d Author: ThakkerDate: 2016-11-29T19:13:13Z CAMEL-10491 - Spring-LDAP - Utilizing java.util.function.BiFunction (Java 8) for FUNCTION_DRIVEN operation. > Spring-LDAP - Add support for authenticate, modify_attributes and > function_driven operations > > > Key: CAMEL-10491 > URL: https://issues.apache.org/jira/browse/CAMEL-10491 > Project: Camel > Issue Type: Improvement >Affects Versions: 2.19.0 >Reporter: Bhavesh >Assignee: Andrea Cosentino >Priority: Minor > Fix For: 2.19.0 > > Original Estimate: 24h > Remaining Estimate: 24h > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10391) Camel-CDI adds every RouteBuilder instance it can find to Camel context
[ https://issues.apache.org/jira/browse/CAMEL-10391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15706212#comment-15706212 ] ASF GitHub Bot commented on CAMEL-10391: GitHub user sverkera opened a pull request: https://github.com/apache/camel/pull/1320 Created a mechanism to configure Camel CDI via CDI event. See https://issues.apache.org/jira/browse/CAMEL-10391 for details, patch for 2.18.x branch You can merge this pull request into a Git repository by running: $ git pull https://github.com/sverkera/camel camel-2.18.x Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/1320.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1320 commit 17ad17af8cc91fd3c319ad109ead8a5962cc4b9f Author: Sverker AbrahamssonDate: 2016-11-29T18:51:31Z Created a mechanism to configure Camel CDI via CDI event. Currently the only setting is to turn off automatic add of RouteBuilders to context. > Camel-CDI adds every RouteBuilder instance it can find to Camel context > --- > > Key: CAMEL-10391 > URL: https://issues.apache.org/jira/browse/CAMEL-10391 > Project: Camel > Issue Type: Improvement > Components: camel-cdi >Affects Versions: 2.18.0 > Environment: Wildfly 10 with wildfly-camel extension >Reporter: Sverker Abrahamsson >Assignee: Antonin Stefanutti > > Camel-CDI will find every class in a deployment which extends RouteBuilder > and automatically add them to the context. This is a major issue for me as I > usually wants to instantiate my RouteBuilders programatically setting various > parameters, with CDI support. > This behaviour was introduced with > https://github.com/apache/camel/commit/0421c24dfcf992f3296ed746469771e3800200e3 > from [~antonin.stefanutti] and we had a good discussion about the issue on > his github project in https://github.com/astefanutti/camel-cdi/issues/12 but > never came up with a good solution for it. I have patched camel-cdi to use a > marker annotation @DoNotAddToCamelContext to work around it but I don't want > to have to patch every release I use.. > I understand the logic why Camel-CDI finds and add every RouteBuilder class, > even though I don't agree that it is a good idea but it could very well be > the default behavior as long as it is possible to override it. > What I would like is a discussion on how this could be made configurable. I'm > thinking about if there could be an annotation like > @CamelContextStartup(false) or maybe even a more general > @CamelContextConfig(autostart=false) if there are other things that should be > configurable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10391) Camel-CDI adds every RouteBuilder instance it can find to Camel context
[ https://issues.apache.org/jira/browse/CAMEL-10391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15706207#comment-15706207 ] ASF GitHub Bot commented on CAMEL-10391: GitHub user sverkera opened a pull request: https://github.com/apache/camel/pull/1319 Created a mechanism to configure Camel CDI via CDI event. See https://issues.apache.org/jira/browse/CAMEL-10391 for details You can merge this pull request into a Git repository by running: $ git pull https://github.com/sverkera/camel master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/1319.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1319 commit 71d7939c419a98de5a3edc5aa8050f04eeb0 Author: Sverker AbrahamssonDate: 2016-11-29T18:51:31Z Created a mechanism to configure Camel CDI via CDI event. Currently the only setting is to turn off automatic add of RouteBuilders to context. > Camel-CDI adds every RouteBuilder instance it can find to Camel context > --- > > Key: CAMEL-10391 > URL: https://issues.apache.org/jira/browse/CAMEL-10391 > Project: Camel > Issue Type: Improvement > Components: camel-cdi >Affects Versions: 2.18.0 > Environment: Wildfly 10 with wildfly-camel extension >Reporter: Sverker Abrahamsson >Assignee: Antonin Stefanutti > > Camel-CDI will find every class in a deployment which extends RouteBuilder > and automatically add them to the context. This is a major issue for me as I > usually wants to instantiate my RouteBuilders programatically setting various > parameters, with CDI support. > This behaviour was introduced with > https://github.com/apache/camel/commit/0421c24dfcf992f3296ed746469771e3800200e3 > from [~antonin.stefanutti] and we had a good discussion about the issue on > his github project in https://github.com/astefanutti/camel-cdi/issues/12 but > never came up with a good solution for it. I have patched camel-cdi to use a > marker annotation @DoNotAddToCamelContext to work around it but I don't want > to have to patch every release I use.. > I understand the logic why Camel-CDI finds and add every RouteBuilder class, > even though I don't agree that it is a good idea but it could very well be > the default behavior as long as it is possible to override it. > What I would like is a discussion on how this could be made configurable. I'm > thinking about if there could be an annotation like > @CamelContextStartup(false) or maybe even a more general > @CamelContextConfig(autostart=false) if there are other things that should be > configurable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CAMEL-10542) DataFormat from registry is used for every dataformat operation (marshal/unmarshal)
[ https://issues.apache.org/jira/browse/CAMEL-10542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Luca Burgazzoli reassigned CAMEL-10542: --- Assignee: Luca Burgazzoli > DataFormat from registry is used for every dataformat operation > (marshal/unmarshal) > --- > > Key: CAMEL-10542 > URL: https://issues.apache.org/jira/browse/CAMEL-10542 > Project: Camel > Issue Type: Bug > Components: camel-core >Reporter: Luca Burgazzoli >Assignee: Luca Burgazzoli > Fix For: 2.18.2, 2.19.0 > > > While working on an issue related to spring-boot I found out that if a data > format is registered in camel registry with the same name as the one camel > looks-up with the help of DefaultDataFormatResolver, this object is then > re-configured for each data format definition so one definition may override > previous configuration with an undefined behavior. > So assume you have an xml route definitions as: > {code:xml} > http://camel.apache.org/schema/spring;> > > > > > > > > > > > > > > {code} > And some code like: > {code:java} > InputStream is = getClass().getResourceAsStream("..."); > SimpleRegistry reg = new SimpleRegistry(); > reg.put("csv-dataformat", new CsvDataFormat()); > DefaultCamelContext ctx = new DefaultCamelContext(reg); > ctx.addRouteDefinitions(ctx.loadRoutesDefinition(is).getRoutes()); > ctx.start(); > ProducerTemplate template = ctx.createProducerTemplate(); > String result = template.requestBody( > "direct:marshal", > Arrays.asList(Arrays.asList( "A1", "B1", "C1" )), > String.class); > assertEquals("A1,B1,C1", result); > ctx.stop > {code} > Then this test fails with: > {code} > Expected :A1,B1,C1 > Actual :A1;B1;C1 > {code} > It fails because the object added to the SimpleRegistry is shared among the > two csv dataformats so it is configured to have delimiter = ';' > For spring-boot this causes some issues as it registers data formats beans as > part of its auto-configuration magic thus if you do not set your own instance > of data format, any data format operation like marshal/unmarshal may not work > as expected. > - for spring-boot a solution would be to annotate auto configured data format > beans with prototype scope. > - a more generic solution would be to make DataFormat Cloneable and clone the > bean found in the registry -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CAMEL-10539) When bridging http endpoints and end users do not enable the bridgeEndpoint option they may get a NPE exception
[ https://issues.apache.org/jira/browse/CAMEL-10539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-10539. - Resolution: Fixed You now get a better error message > When bridging http endpoints and end users do not enable the bridgeEndpoint > option they may get a NPE exception > --- > > Key: CAMEL-10539 > URL: https://issues.apache.org/jira/browse/CAMEL-10539 > Project: Camel > Issue Type: Bug > Components: camel-http, camel-jetty >Affects Versions: 2.18.0 >Reporter: Frank Wein >Assignee: Claus Ibsen >Priority: Minor > Fix For: 2.18.2, 2.19.0 > > > I noticed that you get a NullPointerException when you forget the > bridgeEndpoint=true option when bridging two HTTP endpoints (first endpoint > is a REST Jetty endpoint, second one also uses Jetty). Maybe Camel can warn > in this case that the bridgeEndpoint parameter is missing. > Simplified basic code (Java): > {noformat} > restConfiguration().component("jetty").host("0.0.0.0").port(8080) > .dataFormatProperty("prettyPrint", "true") > .bindingMode(RestBindingMode.auto); > rest("/API/").get("/{ID}/").to("jetty:http://www.google.com;); > {noformat} > HTTP Request to http://localhost:8080/API/1/ results in NullPointerException. > Stacktrace: > java.lang.NullPointerException > at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:521) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:694) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:678) > at > org.apache.camel.component.jetty9.JettyContentExchange9.send(JettyContentExchange9.java:228) > at > org.apache.camel.component.jetty.JettyHttpProducer.processInternal(JettyHttpProducer.java:247) > at > org.apache.camel.component.jetty.JettyHttpProducer.process(JettyHttpProducer.java:86) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at > org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:191) > at > org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:74) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > This issue is probably a bit related to the already resolved CAMEL-4242. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CAMEL-10544) Upgrade to smack 4.1
[ https://issues.apache.org/jira/browse/CAMEL-10544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Schneider updated CAMEL-10544: Description: Smack 4.1 changed some of the API. This issue covers upgrading the dependency as well as the camel-xmpp code. > Upgrade to smack 4.1 > > > Key: CAMEL-10544 > URL: https://issues.apache.org/jira/browse/CAMEL-10544 > Project: Camel > Issue Type: Improvement > Components: camel-xmpp >Affects Versions: 2.18.0 >Reporter: Christian Schneider >Assignee: Christian Schneider > Fix For: 2.19.0 > > > Smack 4.1 changed some of the API. This issue covers upgrading the dependency > as well as the camel-xmpp code. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CAMEL-10544) Upgrade to smack 4.1
Christian Schneider created CAMEL-10544: --- Summary: Upgrade to smack 4.1 Key: CAMEL-10544 URL: https://issues.apache.org/jira/browse/CAMEL-10544 Project: Camel Issue Type: Improvement Components: camel-xmpp Affects Versions: 2.18.0 Reporter: Christian Schneider Assignee: Christian Schneider Fix For: 2.19.0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10391) Camel-CDI adds every RouteBuilder instance it can find to Camel context
[ https://issues.apache.org/jira/browse/CAMEL-10391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15705423#comment-15705423 ] Sverker Abrahamsson commented on CAMEL-10391: - Ok, found the issue. I was sending the configuration event in method listening to AfterDeploymentValidation, but that is called after AfterBeanDiscovery which is where CdiCamelExtension hangs when trying to add my RouteBuilders. So I moved the code for sending out the event to first thing in CdiCamelExtension.afterBeanDiscovery() and it works like a charm. > Camel-CDI adds every RouteBuilder instance it can find to Camel context > --- > > Key: CAMEL-10391 > URL: https://issues.apache.org/jira/browse/CAMEL-10391 > Project: Camel > Issue Type: Improvement > Components: camel-cdi >Affects Versions: 2.18.0 > Environment: Wildfly 10 with wildfly-camel extension >Reporter: Sverker Abrahamsson >Assignee: Antonin Stefanutti > > Camel-CDI will find every class in a deployment which extends RouteBuilder > and automatically add them to the context. This is a major issue for me as I > usually wants to instantiate my RouteBuilders programatically setting various > parameters, with CDI support. > This behaviour was introduced with > https://github.com/apache/camel/commit/0421c24dfcf992f3296ed746469771e3800200e3 > from [~antonin.stefanutti] and we had a good discussion about the issue on > his github project in https://github.com/astefanutti/camel-cdi/issues/12 but > never came up with a good solution for it. I have patched camel-cdi to use a > marker annotation @DoNotAddToCamelContext to work around it but I don't want > to have to patch every release I use.. > I understand the logic why Camel-CDI finds and add every RouteBuilder class, > even though I don't agree that it is a good idea but it could very well be > the default behavior as long as it is possible to override it. > What I would like is a discussion on how this could be made configurable. I'm > thinking about if there could be an annotation like > @CamelContextStartup(false) or maybe even a more general > @CamelContextConfig(autostart=false) if there are other things that should be > configurable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CAMEL-10539) When bridging http endpoints and end users do not enable the bridgeEndpoint option they may get a NPE exception
[ https://issues.apache.org/jira/browse/CAMEL-10539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-10539: --- Assignee: Claus Ibsen > When bridging http endpoints and end users do not enable the bridgeEndpoint > option they may get a NPE exception > --- > > Key: CAMEL-10539 > URL: https://issues.apache.org/jira/browse/CAMEL-10539 > Project: Camel > Issue Type: Bug > Components: camel-http, camel-jetty >Affects Versions: 2.18.0 >Reporter: Frank Wein >Assignee: Claus Ibsen >Priority: Minor > Fix For: 2.18.2, 2.19.0 > > > I noticed that you get a NullPointerException when you forget the > bridgeEndpoint=true option when bridging two HTTP endpoints (first endpoint > is a REST Jetty endpoint, second one also uses Jetty). Maybe Camel can warn > in this case that the bridgeEndpoint parameter is missing. > Simplified basic code (Java): > {noformat} > restConfiguration().component("jetty").host("0.0.0.0").port(8080) > .dataFormatProperty("prettyPrint", "true") > .bindingMode(RestBindingMode.auto); > rest("/API/").get("/{ID}/").to("jetty:http://www.google.com;); > {noformat} > HTTP Request to http://localhost:8080/API/1/ results in NullPointerException. > Stacktrace: > java.lang.NullPointerException > at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:521) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:694) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:678) > at > org.apache.camel.component.jetty9.JettyContentExchange9.send(JettyContentExchange9.java:228) > at > org.apache.camel.component.jetty.JettyHttpProducer.processInternal(JettyHttpProducer.java:247) > at > org.apache.camel.component.jetty.JettyHttpProducer.process(JettyHttpProducer.java:86) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at > org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:191) > at > org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:74) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > This issue is probably a bit related to the already resolved CAMEL-4242. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CAMEL-10539) When bridging http endpoints and end users do not enable the bridgeEndpoint option they may get a NPE exception
[ https://issues.apache.org/jira/browse/CAMEL-10539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-10539: Fix Version/s: 2.19.0 2.18.2 > When bridging http endpoints and end users do not enable the bridgeEndpoint > option they may get a NPE exception > --- > > Key: CAMEL-10539 > URL: https://issues.apache.org/jira/browse/CAMEL-10539 > Project: Camel > Issue Type: Bug > Components: camel-http, camel-jetty >Affects Versions: 2.18.0 >Reporter: Frank Wein >Priority: Minor > Fix For: 2.18.2, 2.19.0 > > > I noticed that you get a NullPointerException when you forget the > bridgeEndpoint=true option when bridging two HTTP endpoints (first endpoint > is a REST Jetty endpoint, second one also uses Jetty). Maybe Camel can warn > in this case that the bridgeEndpoint parameter is missing. > Simplified basic code (Java): > {noformat} > restConfiguration().component("jetty").host("0.0.0.0").port(8080) > .dataFormatProperty("prettyPrint", "true") > .bindingMode(RestBindingMode.auto); > rest("/API/").get("/{ID}/").to("jetty:http://www.google.com;); > {noformat} > HTTP Request to http://localhost:8080/API/1/ results in NullPointerException. > Stacktrace: > java.lang.NullPointerException > at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:521) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:694) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:678) > at > org.apache.camel.component.jetty9.JettyContentExchange9.send(JettyContentExchange9.java:228) > at > org.apache.camel.component.jetty.JettyHttpProducer.processInternal(JettyHttpProducer.java:247) > at > org.apache.camel.component.jetty.JettyHttpProducer.process(JettyHttpProducer.java:86) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at > org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:191) > at > org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:74) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > This issue is probably a bit related to the already resolved CAMEL-4242. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10539) When bridging http endpoints and end users do not enable the bridgeEndpoint option they may get a NPE exception
[ https://issues.apache.org/jira/browse/CAMEL-10539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704761#comment-15704761 ] Claus Ibsen commented on CAMEL-10539: - Yeah its a NPE bug in jetty client at {code} String scheme = request.getScheme().toLowerCase(Locale.ENGLISH); {code} > When bridging http endpoints and end users do not enable the bridgeEndpoint > option they may get a NPE exception > --- > > Key: CAMEL-10539 > URL: https://issues.apache.org/jira/browse/CAMEL-10539 > Project: Camel > Issue Type: Bug > Components: camel-http, camel-jetty >Affects Versions: 2.18.0 >Reporter: Frank Wein >Priority: Minor > > I noticed that you get a NullPointerException when you forget the > bridgeEndpoint=true option when bridging two HTTP endpoints (first endpoint > is a REST Jetty endpoint, second one also uses Jetty). Maybe Camel can warn > in this case that the bridgeEndpoint parameter is missing. > Simplified basic code (Java): > {noformat} > restConfiguration().component("jetty").host("0.0.0.0").port(8080) > .dataFormatProperty("prettyPrint", "true") > .bindingMode(RestBindingMode.auto); > rest("/API/").get("/{ID}/").to("jetty:http://www.google.com;); > {noformat} > HTTP Request to http://localhost:8080/API/1/ results in NullPointerException. > Stacktrace: > java.lang.NullPointerException > at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:521) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:694) > at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:678) > at > org.apache.camel.component.jetty9.JettyContentExchange9.send(JettyContentExchange9.java:228) > at > org.apache.camel.component.jetty.JettyHttpProducer.processInternal(JettyHttpProducer.java:247) > at > org.apache.camel.component.jetty.JettyHttpProducer.process(JettyHttpProducer.java:86) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197) > at > org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:191) > at > org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:74) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > This issue is probably a bit related to the already resolved CAMEL-4242. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10543) New Apache Camel Logo
[ https://issues.apache.org/jira/browse/CAMEL-10543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704740#comment-15704740 ] Nicola Ferraro commented on CAMEL-10543: There is an ongoing discussion here: https://github.com/opensourcedesign/jobs/issues/108. There are some proposals but we've not reached an agreement (although people say we will finalize it before January). > New Apache Camel Logo > - > > Key: CAMEL-10543 > URL: https://issues.apache.org/jira/browse/CAMEL-10543 > Project: Camel > Issue Type: Improvement > Components: website >Reporter: Luca Burgazzoli > Fix For: Future > > > The Apache Camel logo is a bit out dated so we have discussed in the > community to come up with a new one. We encourage anyone to participate by > submitting a PR on GitHub and share thoughts. > - images should be added to docs/img > - each PR should contains a single logo -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10529) The "exchange" keyword in LogEIP was incorrectly evaluated as a Camel Exchange type even without "${ }"
[ https://issues.apache.org/jira/browse/CAMEL-10529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704732#comment-15704732 ] Claus Ibsen commented on CAMEL-10529: - I updated the doc as it was a bit wrong and also marked the old syntax as deprecated > The "exchange" keyword in LogEIP was incorrectly evaluated as a Camel > Exchange type even without "${ }" > --- > > Key: CAMEL-10529 > URL: https://issues.apache.org/jira/browse/CAMEL-10529 > Project: Camel > Issue Type: Bug > Components: camel-language >Affects Versions: 2.17.0 >Reporter: Joe Luo > > I have a very simple camel route: > {code} > http://camel.apache.org/schema/blueprint;> > > > > hello Camel! > > > > > {code} > Then I am getting the following error: > {code} > 16:09:32,724 | WARN | #3 - timer://foo | TimerConsumer | 232 - > org.apache.camel.camel-core - 2.17.0.redhat-630187 | Error processing > exchange. Exchange[ID-jluomac-54194-1480090135878-3-4]. Caused by: > [org.apache.camel.RuntimeCamelException - > org.apache.camel.component.bean.MethodNotFoundException: Method with name: is > triggered not found on bean: Exchange[ID-jluomac-54194-1480090135878-3-4] of > type: org.apache.camel.impl.DefaultExchange] > org.apache.camel.RuntimeCamelException: > org.apache.camel.component.bean.MethodNotFoundException: Method with name: is > triggered not found on bean: Exchange[ID-jluomac-54194-1480090135878-3-4] of > type: org.apache.camel.impl.DefaultExchange > {code} > It looks like it was incorrectly evaluated as a Camel Exchange type for some > reason. > Furthermore, it is only causing the problem when it is in the beginning of > the LogEIP message. If it is not, it works fine. For instance, following line > will cause problem: > {code} > > {code} > But this will work: > {code} > > {code} > As long as you are not placing the keyword "exchange" in the beginning of the > LogEIP message, it will be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CAMEL-10529) The "exchange" keyword in LogEIP was incorrectly evaluated as a Camel Exchange type even without "${ }"
[ https://issues.apache.org/jira/browse/CAMEL-10529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-10529. - Resolution: Won't Fix Assignee: Claus Ibsen > The "exchange" keyword in LogEIP was incorrectly evaluated as a Camel > Exchange type even without "${ }" > --- > > Key: CAMEL-10529 > URL: https://issues.apache.org/jira/browse/CAMEL-10529 > Project: Camel > Issue Type: Bug > Components: camel-language >Affects Versions: 2.17.0 >Reporter: Joe Luo >Assignee: Claus Ibsen > > I have a very simple camel route: > {code} > http://camel.apache.org/schema/blueprint;> > > > > hello Camel! > > > > > {code} > Then I am getting the following error: > {code} > 16:09:32,724 | WARN | #3 - timer://foo | TimerConsumer | 232 - > org.apache.camel.camel-core - 2.17.0.redhat-630187 | Error processing > exchange. Exchange[ID-jluomac-54194-1480090135878-3-4]. Caused by: > [org.apache.camel.RuntimeCamelException - > org.apache.camel.component.bean.MethodNotFoundException: Method with name: is > triggered not found on bean: Exchange[ID-jluomac-54194-1480090135878-3-4] of > type: org.apache.camel.impl.DefaultExchange] > org.apache.camel.RuntimeCamelException: > org.apache.camel.component.bean.MethodNotFoundException: Method with name: is > triggered not found on bean: Exchange[ID-jluomac-54194-1480090135878-3-4] of > type: org.apache.camel.impl.DefaultExchange > {code} > It looks like it was incorrectly evaluated as a Camel Exchange type for some > reason. > Furthermore, it is only causing the problem when it is in the beginning of > the LogEIP message. If it is not, it works fine. For instance, following line > will cause problem: > {code} > > {code} > But this will work: > {code} > > {code} > As long as you are not placing the keyword "exchange" in the beginning of the > LogEIP message, it will be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CAMEL-10492) Camel Servlet, attachment object is empty
[ https://issues.apache.org/jira/browse/CAMEL-10492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-10492. - Resolution: Fixed Fix Version/s: (was: Future) 2.19.0 > Camel Servlet, attachment object is empty > - > > Key: CAMEL-10492 > URL: https://issues.apache.org/jira/browse/CAMEL-10492 > Project: Camel > Issue Type: Bug > Components: camel-http-common, camel-servlet >Affects Versions: 2.18.0 >Reporter: Fabrizio Spataro >Assignee: Claus Ibsen >Priority: Minor > Fix For: 2.19.0 > > Attachments: camel-example-servlet-attachment.zip > > > I send a multipart form data to my camel servlet, before camel 2.18 > attachment object is ok now is empty! > Now i have an *header* every form field but every field is java.lang.String > So, I can not post any binary file. > This is my web.xml filter > {code:xml} > > MultipartFilter > > org.eclipse.jetty.servlets.MultiPartFilter > > > MultipartFilter > CamelServlet > > {code} > Into zip file, you can found an example. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CAMEL-10542) DataFormat from registry is used for every dataformat operation (marshal/unmarshal)
[ https://issues.apache.org/jira/browse/CAMEL-10542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Luca Burgazzoli updated CAMEL-10542: Description: While working on an issue related to spring-boot I found out that if a data format is registered in camel registry with the same name as the one camel looks-up with the help of DefaultDataFormatResolver, this object is then re-configured for each data format definition so one definition may override previous configuration with an undefined behavior. So assume you have an xml route definitions as: {code:xml} http://camel.apache.org/schema/spring;> {code} And some code like: {code:java} InputStream is = getClass().getResourceAsStream("..."); SimpleRegistry reg = new SimpleRegistry(); reg.put("csv-dataformat", new CsvDataFormat()); DefaultCamelContext ctx = new DefaultCamelContext(reg); ctx.addRouteDefinitions(ctx.loadRoutesDefinition(is).getRoutes()); ctx.start(); ProducerTemplate template = ctx.createProducerTemplate(); String result = template.requestBody( "direct:marshal", Arrays.asList(Arrays.asList( "A1", "B1", "C1" )), String.class); assertEquals("A1,B1,C1", result); ctx.stop {code} Then this test fails with: {code} Expected :A1,B1,C1 Actual :A1;B1;C1 {code} It fails because the object added to the SimpleRegistry is shared among the two csv dataformats so it is configured to have delimiter = ';' For spring-boot this causes some issues as it registers data formats beans as part of its auto-configuration magic thus if you do not set your own instance of data format, any data format operation like marshal/unmarshal may not work as expected. - for spring-boot a solution would be to annotate auto configured data format beans with prototype scope. - a more generic solution would be to make DataFormat Cloneable and clone the bean found in the registry was: While working on an issue related to spring-boot I found out that if a data format is registered in camel registry with the same name as the one camel looks-up with the help of DefaultDataFormatResolver, this object is then re-configured for each data format definition so one definition may override previous configuration with an undefined behavior. So assume you have an xml route definitions as: {code:xml} http://camel.apache.org/schema/spring;> {code} And some code like: {code:java} InputStream is = getClass().getResourceAsStream("..."); SimpleRegistry reg = new SimpleRegistry(); reg.put("csv-dataformat", new CsvDataFormat()); DefaultCamelContext ctx = new DefaultCamelContext(reg); ctx.addRouteDefinitions(ctx.loadRoutesDefinition(is).getRoutes()); ctx.start(); ProducerTemplate template = ctx.createProducerTemplate(); String result = template.requestBody( "direct:marshal", Arrays.asList(Arrays.asList( "A1", "B1", "C1" )), String.class); assertEquals("A1,B1,C1", result); ctx.stop {code} Then this test fails with: {code} Expected :A1,B1,C1 Actual :A1;B1;C1 {code} It fails because the object added to the SimpleRegistry is shared among the two csv dataformats so it is configured to have delimiter = ';' > DataFormat from registry is used for every dataformat operation > (marshal/unmarshal) > --- > > Key: CAMEL-10542 > URL: https://issues.apache.org/jira/browse/CAMEL-10542 > Project: Camel > Issue Type: Bug > Components: camel-core >Reporter: Luca Burgazzoli > Fix For: 2.18.2, 2.19.0 > > > While working on an issue related to spring-boot I found out that if a data > format is registered in camel registry with the same name as the one camel > looks-up with the help of DefaultDataFormatResolver, this object is then > re-configured for each data format definition so one definition may override > previous configuration with an undefined behavior. > So assume you have an xml route definitions as: > {code:xml} > http://camel.apache.org/schema/spring;> > > > > > > > > > > > > > > {code} > And some code like: > {code:java} > InputStream is = getClass().getResourceAsStream("..."); > SimpleRegistry reg = new SimpleRegistry(); > reg.put("csv-dataformat", new CsvDataFormat()); > DefaultCamelContext ctx = new DefaultCamelContext(reg); > ctx.addRouteDefinitions(ctx.loadRoutesDefinition(is).getRoutes()); > ctx.start(); > ProducerTemplate template = ctx.createProducerTemplate(); > String result = template.requestBody( > "direct:marshal", > Arrays.asList(Arrays.asList( "A1", "B1", "C1" )), > String.class); > assertEquals("A1,B1,C1", result); > ctx.stop > {code} > Then this test fails with: > {code} > Expected :A1,B1,C1 > Actual
[jira] [Commented] (CAMEL-10492) Camel Servlet, attachment object is empty
[ https://issues.apache.org/jira/browse/CAMEL-10492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704689#comment-15704689 ] Claus Ibsen commented on CAMEL-10492: - Ah I think maybe in the past attachmentMultipartBinding=true turned off stream caching to make it work, so we could likely do that again. > Camel Servlet, attachment object is empty > - > > Key: CAMEL-10492 > URL: https://issues.apache.org/jira/browse/CAMEL-10492 > Project: Camel > Issue Type: Bug > Components: camel-http-common, camel-servlet >Affects Versions: 2.18.0 >Reporter: Fabrizio Spataro >Assignee: Claus Ibsen >Priority: Minor > Fix For: Future > > Attachments: camel-example-servlet-attachment.zip > > > I send a multipart form data to my camel servlet, before camel 2.18 > attachment object is ok now is empty! > Now i have an *header* every form field but every field is java.lang.String > So, I can not post any binary file. > This is my web.xml filter > {code:xml} > > MultipartFilter > > org.eclipse.jetty.servlets.MultiPartFilter > > > MultipartFilter > CamelServlet > > {code} > Into zip file, you can found an example. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10391) Camel-CDI adds every RouteBuilder instance it can find to Camel context
[ https://issues.apache.org/jira/browse/CAMEL-10391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704687#comment-15704687 ] Antonin Stefanutti commented on CAMEL-10391: I would try to ask the CDI dev list first about the best strategy as CDI and EAR is a bit ill-defined. > Camel-CDI adds every RouteBuilder instance it can find to Camel context > --- > > Key: CAMEL-10391 > URL: https://issues.apache.org/jira/browse/CAMEL-10391 > Project: Camel > Issue Type: Improvement > Components: camel-cdi >Affects Versions: 2.18.0 > Environment: Wildfly 10 with wildfly-camel extension >Reporter: Sverker Abrahamsson >Assignee: Antonin Stefanutti > > Camel-CDI will find every class in a deployment which extends RouteBuilder > and automatically add them to the context. This is a major issue for me as I > usually wants to instantiate my RouteBuilders programatically setting various > parameters, with CDI support. > This behaviour was introduced with > https://github.com/apache/camel/commit/0421c24dfcf992f3296ed746469771e3800200e3 > from [~antonin.stefanutti] and we had a good discussion about the issue on > his github project in https://github.com/astefanutti/camel-cdi/issues/12 but > never came up with a good solution for it. I have patched camel-cdi to use a > marker annotation @DoNotAddToCamelContext to work around it but I don't want > to have to patch every release I use.. > I understand the logic why Camel-CDI finds and add every RouteBuilder class, > even though I don't agree that it is a good idea but it could very well be > the default behavior as long as it is possible to override it. > What I would like is a discussion on how this could be made configurable. I'm > thinking about if there could be an annotation like > @CamelContextStartup(false) or maybe even a more general > @CamelContextConfig(autostart=false) if there are other things that should be > configurable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CAMEL-10509) ManagedCamelContextMBean - additional namespaces are removed
[ https://issues.apache.org/jira/browse/CAMEL-10509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704682#comment-15704682 ] Claus Ibsen commented on CAMEL-10509: - [~jamesnetherton] I granted your user karma to self assign jira tickets. > ManagedCamelContextMBean - additional namespaces are removed > > > Key: CAMEL-10509 > URL: https://issues.apache.org/jira/browse/CAMEL-10509 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.18.0 >Reporter: Aurelien Pupier >Assignee: James Netherton > Fix For: 2.19.0 > > > - Use a specific namespace, declared at CamelContext level, in an Xpath > expression of a When > something like: > {noformat} > http://www.osgi.org/xmlns/blueprint/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd > http://camel.apache.org/schema/blueprint > http://camel.apache.org/schema/blueprint/camel-blueprint.xsd;> > > xmlns="http://camel.apache.org/schema/blueprint; > xmlns:order="http://fabric8.com/examples/order/v7;> > > > > > > > id="_xpath1">/order:order/order:customer/order:country = 'UK' > > > > > id="_xpath2">/order:order/order:customer/order:country = 'US' > > > > > > > > > > > > > {noformat} > - Deploy the project > - Using MBean retrieve dumpRoutesAsXml is providing a route without the > additional xml namespace provided > xmlns:order="http://fabric8.com/examples/order/v7; > {noformat} > > xmlns="http://camel.apache.org/schema/spring;> > > > > > > /order:order/order:customer/order:country > = 'UK' > > > > > /order:order/order:customer/order:country > = 'US' > > > > > > uri="file:work/cbr/output/others"/> > > > > > > {noformat} > - Then use addOrUpdateRoutesFromXml to upload the exact same xml, you will > get exceptions when the When code is invoked: > {noformat} > Message History > --- > RouteId ProcessorId Processor > Elapsed (ms) > [cbr-route ] [cbr-route ] [file://work/cbr/input >] [ 1] > [cbr-route ] [_log1 ] [log >] [ 0] > [cbr-route ] [_choice1 ] [when[xpath{XPath: > /order:order/order:customer/order:country = 'UK'}]choice[whe] [ 1] > Stacktrace > --- > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: > /order:order/order:customer/order:country = 'UK'. Reason: > javax.xml.xpath.XPathExpressionException: > com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix > must resolve to a namespace: order > at > org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:769) > at > org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:155) > at > org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65) > at > org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at >
[jira] [Updated] (CAMEL-10509) ManagedCamelContextMBean - additional namespaces are removed
[ https://issues.apache.org/jira/browse/CAMEL-10509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-10509: Assignee: James Netherton > ManagedCamelContextMBean - additional namespaces are removed > > > Key: CAMEL-10509 > URL: https://issues.apache.org/jira/browse/CAMEL-10509 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.18.0 >Reporter: Aurelien Pupier >Assignee: James Netherton > Fix For: 2.19.0 > > > - Use a specific namespace, declared at CamelContext level, in an Xpath > expression of a When > something like: > {noformat} > http://www.osgi.org/xmlns/blueprint/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd > http://camel.apache.org/schema/blueprint > http://camel.apache.org/schema/blueprint/camel-blueprint.xsd;> > > xmlns="http://camel.apache.org/schema/blueprint; > xmlns:order="http://fabric8.com/examples/order/v7;> > > > > > > > id="_xpath1">/order:order/order:customer/order:country = 'UK' > > > > > id="_xpath2">/order:order/order:customer/order:country = 'US' > > > > > > > > > > > > > {noformat} > - Deploy the project > - Using MBean retrieve dumpRoutesAsXml is providing a route without the > additional xml namespace provided > xmlns:order="http://fabric8.com/examples/order/v7; > {noformat} > > xmlns="http://camel.apache.org/schema/spring;> > > > > > > /order:order/order:customer/order:country > = 'UK' > > > > > /order:order/order:customer/order:country > = 'US' > > > > > > uri="file:work/cbr/output/others"/> > > > > > > {noformat} > - Then use addOrUpdateRoutesFromXml to upload the exact same xml, you will > get exceptions when the When code is invoked: > {noformat} > Message History > --- > RouteId ProcessorId Processor > Elapsed (ms) > [cbr-route ] [cbr-route ] [file://work/cbr/input >] [ 1] > [cbr-route ] [_log1 ] [log >] [ 0] > [cbr-route ] [_choice1 ] [when[xpath{XPath: > /order:order/order:customer/order:country = 'UK'}]choice[whe] [ 1] > Stacktrace > --- > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: > /order:order/order:customer/order:country = 'UK'. Reason: > javax.xml.xpath.XPathExpressionException: > com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prefix > must resolve to a namespace: order > at > org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:769) > at > org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:155) > at > org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65) > at > org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196) > at > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454) > at >
[jira] [Commented] (CAMEL-10391) Camel-CDI adds every RouteBuilder instance it can find to Camel context
[ https://issues.apache.org/jira/browse/CAMEL-10391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15704667#comment-15704667 ] Sverker Abrahamsson commented on CAMEL-10391: - Seems to be the issue with CDI events over classloader boundary which is an issue with ear packaged apps. Any idea on how to work around that? > Camel-CDI adds every RouteBuilder instance it can find to Camel context > --- > > Key: CAMEL-10391 > URL: https://issues.apache.org/jira/browse/CAMEL-10391 > Project: Camel > Issue Type: Improvement > Components: camel-cdi >Affects Versions: 2.18.0 > Environment: Wildfly 10 with wildfly-camel extension >Reporter: Sverker Abrahamsson >Assignee: Antonin Stefanutti > > Camel-CDI will find every class in a deployment which extends RouteBuilder > and automatically add them to the context. This is a major issue for me as I > usually wants to instantiate my RouteBuilders programatically setting various > parameters, with CDI support. > This behaviour was introduced with > https://github.com/apache/camel/commit/0421c24dfcf992f3296ed746469771e3800200e3 > from [~antonin.stefanutti] and we had a good discussion about the issue on > his github project in https://github.com/astefanutti/camel-cdi/issues/12 but > never came up with a good solution for it. I have patched camel-cdi to use a > marker annotation @DoNotAddToCamelContext to work around it but I don't want > to have to patch every release I use.. > I understand the logic why Camel-CDI finds and add every RouteBuilder class, > even though I don't agree that it is a good idea but it could very well be > the default behavior as long as it is possible to override it. > What I would like is a discussion on how this could be made configurable. I'm > thinking about if there could be an annotation like > @CamelContextStartup(false) or maybe even a more general > @CamelContextConfig(autostart=false) if there are other things that should be > configurable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)