Using camel-main, xml route, referencing a java class as processor

2022-01-17 Thread Chirag
Hello, I have a scenario where I am using camel-main with XML Route and a Java Class as a Processor. It gives me following error: Exception in thread "main" org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> process[ref:#class:org.myorg.camel.MyProcessor] <<< in

Re: Using camel-main, xml route, referencing a java class as processor

2022-01-17 Thread Claus Ibsen
What camel version do you use On Mon, Jan 17, 2022 at 9:27 AM Chirag wrote: > > Hello, > I have a scenario where I am using camel-main with XML Route and a Java > Class as a Processor. > > It gives me following error: > > Exception in thread "main" org.apache.camel.FailedToCreateRouteException: >

What is the correct way to build a Predicate from an Expression?

2022-01-17 Thread Steve973
Hello. I am trying to create a Predicate from an Expression. The Expression is created from a String. This is what I am trying to do: String language = "simple"; String value = "${body} contains 'test'"; Expression expression = ExpressionBuilder.languageExpression(language, value); Predicate pr

Re: What is the correct way to build a Predicate from an Expression?

2022-01-17 Thread Claus Ibsen
Hi Language lan = context.resolveLanguage("simple") Predicate p = lan.createPredicate() p.init(context) On Mon, Jan 17, 2022 at 5:50 PM Steve973 wrote: > > Hello. I am trying to create a Predicate from an Expression. The > Expression is created from a String. This is what I am trying to

Re: What is the correct way to build a Predicate from an Expression?

2022-01-17 Thread Steve973
Thank you. That worked well! Steve On Mon, Jan 17, 2022 at 12:18 PM Claus Ibsen wrote: > Hi > > Language lan = context.resolveLanguage("simple") > Predicate p = lan.createPredicate() > p.init(context) > > > > On Mon, Jan 17, 2022 at 5:50 PM Steve973 wrote: > > > > Hello. I am trying to c

Endpoint trying to create additional consumers for URIs with paths

2022-01-17 Thread Steve973
I have added path params to the URI for certain conditions of my component. The normal use case would have a URI like: my-component://name. Now there is another use case where I can specify a URI like: my-component://name//param. In this case, "action" can have different values. But I only want

Re: Using camel-main, xml route, referencing a java class as processor

2022-01-17 Thread Chirag
I use Camel 3.14.0 I haven't figured out how to reply to thead using gmail so please bear with me. On Sun, Jan 16, 2022 at 7:46 PM Chirag wrote: > Hello, > I have a scenario where I am using camel-main with XML Route and a Java > Class as a Processor. > > It gives me following error: > > Except

Re[2]: Using camel-main, xml route, referencing a java class as processor

2022-01-17 Thread Chirag Sanghavi
I am trying with Camel 3.14.0. While debugging I noticed that call gets to ProcessReifier.java public Processor createProcessor() { Processor answer = ((ProcessDefinition)this.definition).getProcessor(); if (answer == null) { ObjectHelper.notNull(((ProcessDefinit

Re: Re[2]: Using camel-main, xml route, referencing a java class as processor

2022-01-17 Thread Claus Ibsen
Hi Yes this is not supported currently. I have created a JIRA and have a fix for this: https://issues.apache.org/jira/browse/CAMEL-17508 On Tue, Jan 18, 2022 at 6:12 AM Chirag Sanghavi wrote: > > I am trying with Camel 3.14.0. > > While debugging I noticed that > > call gets to ProcessReifier.ja

Re: Re[2]: Using camel-main, xml route, referencing a java class as processor

2022-01-17 Thread Claus Ibsen
Hi In Camel 3.14 you can use bean instead of process to refer to the #class. On Tue, Jan 18, 2022 at 7:28 AM Claus Ibsen wrote: > > Hi > > Yes this is not supported currently. I have created a JIRA and have a > fix for this: > https://issues.apache.org/jira/browse/CAMEL-17508 > > On Tue, Jan 18,