AW: Deadletter and Aggregation again
Thats is the hard method. And I am shy to use plain programming in a framework. Regarding split: the problem is that is not a simple spilt. 1. Zip is splitted to XML, TIFF0, TIFF1, 2. XML is splitted to DATA0, DATA1, And TIFF0 and DATA0, (TIFF1, DATA1), ... is combined then. So aggregation is not (directly) bound to a splitter. -Ursprüngliche Nachricht- Von: Claus Ibsen Gesendet: Dienstag, 7. Januar 2020 10:08 An: users@camel.apache.org Betreff: Re: Deadletter and Aggregation again Hi You can set it to noop=true, and then delete/move it from after aggregator in a custom bean/processor On Tue, Jan 7, 2020 at 10:04 AM wrote: > > >The aggregator is a 2 phased EIP so what comes out of the aggregator is not > >tied to the input. That is by design. > > Is there a way to prevent or control the transation, when original input > (file) is deleted/moved? > > > -Ursprüngliche Nachricht- > Von: Claus Ibsen > Gesendet: Montag, 6. Januar 2020 19:50 > An: users@camel.apache.org > Betreff: Re: Deadletter and Aggregation again > > Hi > > The aggregator is a 2 phased EIP so what comes out of the aggregator is not > tied to the input. That is by design. > If you want a fork / join kinda pattern (composed message processor is the > EIP name) then you can do that from the splitter only which has aggregation > strategy built-in. > > On Mon, Jan 6, 2020 at 6:08 PM wrote: > > > > Hi, > > > > to be able to save the original message to dead letter directory even in > > multiple nested splits I store it at a property. > > > > .process(exchange -> { > > final Message orgMessage = > > exchange.getUnitOfWork().getOriginalInMessage(); > > exchange.setProperty(Constants.PROPERTY_ORIGNAL_MESSAGE, > > orgMessage); > > }) > > > > And read it later in errorhandling. > > This is the code for aggregation: > > > > from(EP_AGGREGATION_ SPLIT).routeId(SPLIT_AGGREGATION_ROUTE_ID) > > .throwException(IllegalArgumentException.class, "DEBUG EX1") > > .aggregate(header(Constants.PROPERTY_CASE_ID), new > > ZipAggregationStrategy()) > > .completionTimeout(10 * 1000 * 1) > > > > .completion(header(ZipAggregationStrategy.AGG_PROPERTY_COMPLETED).isEqualTo(true)) > > .throwException(IllegalArgumentException.class, "DEBUG EX2") > > > > when I throw an exception before aggregate (EX1) it works. > > But after (EX2) ist will not. (of course the first > > throwExeption-statement is comment out) Problem is, the original file is > > already deleted /moved into recovery. > > Why? > > How can I prevent this? > > > > Why is it not easy possible to store the original input into a dead letter > > dir or queue regardless how many nested splits and aggregations in case > > somewhere an exception is thrown? > > Just simple and easy. > > > > Regards Thomas > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
AW: Deadletter and Aggregation again
>The aggregator is a 2 phased EIP so what comes out of the aggregator is not >tied to the input. That is by design. Is there a way to prevent or control the transation, when original input (file) is deleted/moved? -Ursprüngliche Nachricht- Von: Claus Ibsen Gesendet: Montag, 6. Januar 2020 19:50 An: users@camel.apache.org Betreff: Re: Deadletter and Aggregation again Hi The aggregator is a 2 phased EIP so what comes out of the aggregator is not tied to the input. That is by design. If you want a fork / join kinda pattern (composed message processor is the EIP name) then you can do that from the splitter only which has aggregation strategy built-in. On Mon, Jan 6, 2020 at 6:08 PM wrote: > > Hi, > > to be able to save the original message to dead letter directory even in > multiple nested splits I store it at a property. > > .process(exchange -> { > final Message orgMessage = > exchange.getUnitOfWork().getOriginalInMessage(); > exchange.setProperty(Constants.PROPERTY_ORIGNAL_MESSAGE, > orgMessage); > }) > > And read it later in errorhandling. > This is the code for aggregation: > > from(EP_AGGREGATION_ SPLIT).routeId(SPLIT_AGGREGATION_ROUTE_ID) > .throwException(IllegalArgumentException.class, "DEBUG EX1") > .aggregate(header(Constants.PROPERTY_CASE_ID), new > ZipAggregationStrategy()) > .completionTimeout(10 * 1000 * 1) > > .completion(header(ZipAggregationStrategy.AGG_PROPERTY_COMPLETED).isEqualTo(true)) > .throwException(IllegalArgumentException.class, "DEBUG EX2") > > when I throw an exception before aggregate (EX1) it works. > But after (EX2) ist will not. (of course the first > throwExeption-statement is comment out) Problem is, the original file is > already deleted /moved into recovery. > Why? > How can I prevent this? > > Why is it not easy possible to store the original input into a dead letter > dir or queue regardless how many nested splits and aggregations in case > somewhere an exception is thrown? > Just simple and easy. > > Regards Thomas -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Deadletter and Aggregation again
Hi, to be able to save the original message to dead letter directory even in multiple nested splits I store it at a property. .process(exchange -> { final Message orgMessage = exchange.getUnitOfWork().getOriginalInMessage(); exchange.setProperty(Constants.PROPERTY_ORIGNAL_MESSAGE, orgMessage); }) And read it later in errorhandling. This is the code for aggregation: from(EP_AGGREGATION_ SPLIT).routeId(SPLIT_AGGREGATION_ROUTE_ID) .throwException(IllegalArgumentException.class, "DEBUG EX1") .aggregate(header(Constants.PROPERTY_CASE_ID), new ZipAggregationStrategy()) .completionTimeout(10 * 1000 * 1) .completion(header(ZipAggregationStrategy.AGG_PROPERTY_COMPLETED).isEqualTo(true)) .throwException(IllegalArgumentException.class, "DEBUG EX2") when I throw an exception before aggregate (EX1) it works. But after (EX2) ist will not. (of course the first throwExeption-statement is comment out) Problem is, the original file is already deleted /moved into recovery. Why? How can I prevent this? Why is it not easy possible to store the original input into a dead letter dir or queue regardless how many nested splits and aggregations in case somewhere an exception is thrown? Just simple and easy. Regards Thomas
ExchangeHelper::getOriginalInMessage
Hi, looking at ExchangeHelper::getOriginalInMessage in case of exceptionhandling and useOriginalMessage() it seems that only the direct parent is used. But the original input (GenericFileMessage) is parent of parent of parent. I could patch the getOriginalInMessage in that way it goes through to the top parent, but I think there must be a better solution. What? Thomas ExchangeHelper::getOriginalInMessage -- public static Message getOriginalInMessage(Exchange exchange) { Message answer = null; // try parent first UnitOfWork uow = exchange.getProperty(Exchange.PARENT_UNIT_OF_WORK, UnitOfWork.class); if (uow != null) { answer = uow.getOriginalInMessage(); } // fallback to the current exchange if (answer == null) { uow = exchange.getUnitOfWork(); if (uow != null) { answer = uow.getOriginalInMessage(); } } return answer; }
useOriginalMessage at parallelProcessing
Hi, I still fiddling around with deadletter handling. I got a zip. This is splitted. When there is an error an exception is thrown. Then error handler (and the route) shall write the original file to dead letter dir. This works when I comment out the parallelProcessing. With parallelProcessing it did not write the original file to dead letter dir, but the xml. To be honest: this is annoying. I simply what to write the original input file (a zip) into dead letter directory in any cases where an exception is thrown. Even after aggregating later. Simple as that. Regards Thomas errorHandler(deadLetterChannel("direct:deadletter").useOriginalMessage()); from("direct:deadletter") .to(String.format("file://%s", DEADDIRECTORY)) from(FILE_IN_URI).routeId(FILE_ROUTE_ID) .split(new ZipSplitter()).shareUnitOfWork() .streaming() .choice() .when(simple("${in.header.CamelFileName} ends with 'xml'")) .split(xpath("/ImgSendFax/Document"))//.parallelProcessing().shareUnitOfWork() -> EXEPTION
AW: Aggregation and unitOfWork
Hi, I tried to. But the messages I get in aggregate(old, new) or different and don’t have the information anymore. And the aggregate-method with three params is never called. @Override public Exchange aggregate(Exchange oldExchange, Exchange newExchange, Exchange inputExchange) { return aggregate(oldExchange, newExchange); } Or I put the original message to message header? Thomas -Ursprüngliche Nachricht- Von: Claus Ibsen Gesendet: Montag, 16. Dezember 2019 06:35 An: users@camel.apache.org Betreff: Re: Aggregation and unitOfWork Hi The output of the aggregate is not tied to any of its input, its a separate new exchange, so they dont' share any unit of work etc. So the data you want as output from the aggregator, you must then add via the aggregation strategy On Thu, Dec 12, 2019 at 2:56 PM wrote: > > Hi, > > Aggration seems to lost the connection to original Message. > > I have the following construct: > > from(FILE_IN_URI) > .split(new ZipSplitter()).shareUnitOfWork() > .streaming() > .choice() >.when(simple("${in.header.CamelFileName} ends with 'xml'")) >.process(exchange -> { > System.out.println("debug exchange"); -> throw > EXCEPTION 1 > }) >.to(EP_AGGREGATION) >.endChoice() > .otherwise() > .to(FILE_OUT_URI) >.process(exchange -> { > System.out.println("debug exchange");-> throw > EXCEPTION 2 > }) > .to(EP_AGGREGATION) > .endChoice() > .end() >.end() > ; > > from(EP_AGGREGATION_) >.aggregate(header("foo"), new ThomasAggregationStrategy()) > .completionTimeout(10 * 1000) > .completion(header("bar").isEqualTo(true)) > .process(exchange -> { > System.out.println("debug exchange"); > }) > .throwException(IllegalArgumentException.class, "Thomas > DEBUG") -> throw EXCEPTION 3 ; > > A route with splitter and an aggregation route. > Before the last "to" at the end I add a process with println to set a > breakpoint and debug the exchange. > > What happens is, when an exception is thrown in the splitter route, e.g. > instead of the debug println. > (EXCEPTION 1 and 2) the deadletter route works. > But when an exception is thrown after aggregation the infos are gone. > I noticed that the exchange at the end, before .to(EP_AGGREGATION) is > different from the exchange the > ThomasAggregationStrategy:: aggregate() sees. I see unitOfWork is gone. > > errorHandler(deadLetterChannel("direct:deadletter").useOriginalMessage()); > from("direct:deadletter") > // save original message > > > -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Aggregation and unitOfWork
Hi, Aggration seems to lost the connection to original Message. I have the following construct: from(FILE_IN_URI) .split(new ZipSplitter()).shareUnitOfWork() .streaming() .choice() .when(simple("${in.header.CamelFileName} ends with 'xml'")) .process(exchange -> { System.out.println("debug exchange"); -> throw EXCEPTION 1 }) .to(EP_AGGREGATION) .endChoice() .otherwise() .to(FILE_OUT_URI) .process(exchange -> { System.out.println("debug exchange");-> throw EXCEPTION 2 }) .to(EP_AGGREGATION) .endChoice() .end() .end() ; from(EP_AGGREGATION_) .aggregate(header("foo"), new ThomasAggregationStrategy()) .completionTimeout(10 * 1000) .completion(header("bar").isEqualTo(true)) .process(exchange -> { System.out.println("debug exchange"); }) .throwException(IllegalArgumentException.class, "Thomas DEBUG") -> throw EXCEPTION 3 ; A route with splitter and an aggregation route. Before the last "to" at the end I add a process with println to set a breakpoint and debug the exchange. What happens is, when an exception is thrown in the splitter route, e.g. instead of the debug println. (EXCEPTION 1 and 2) the deadletter route works. But when an exception is thrown after aggregation the infos are gone. I noticed that the exchange at the end, before .to(EP_AGGREGATION) is different from the exchange the ThomasAggregationStrategy:: aggregate() sees. I see unitOfWork is gone. errorHandler(deadLetterChannel("direct:deadletter").useOriginalMessage()); from("direct:deadletter") // save original message
AW: DefaultComponent
I have it. Its flowable that uses 2-style DefaultComponent etc. -Ursprüngliche Nachricht- Von: Claus Ibsen Gesendet: Dienstag, 3. Dezember 2019 13:44 An: users@camel.apache.org Betreff: Re: DefaultComponent Hi Oh didnt know so much about flowable-camel as its 3rd party and not ASF. Same thing, its likely not Camel 3 compatible, so they need to do a new release that supports Camel 3. On Tue, Dec 3, 2019 at 1:36 PM wrote: > > Its not my components. > Its spring boot or flowable. But I cannot see in dependeny tree where > flowble-camel uses camel-core or camel-support. > > When I patch the classes DefaultComponent /-Consumer etc. it works. > > > -Ursprüngliche Nachricht- > Von: Claus Ibsen > Gesendet: Dienstag, 3. Dezember 2019 13:29 > An: users@camel.apache.org > Betreff: Re: DefaultComponent > > Hi > > If you have custom components you need to source code migrate them to Camel 3 > and rebuild them. Camel 3 does not run with Camel 2 components. > > On Tue, Dec 3, 2019 at 1:21 PM wrote: > > > > Yes. I know and my own components use this. But it seems spring or flowable > > needs this class there. > > > > > > -Ursprüngliche Nachricht- > > Von: Andrea Cosentino > > Gesendet: Dienstag, 3. Dezember 2019 13:01 > > An: users@camel.apache.org > > Cc: dev > > Betreff: Re: DefaultComponent > > > > In Camel 3 the DefaultComponent is located at > > > > org.apache.camel.support > > > > It is reported in the migration guide > > > > https://camel.apache.org/manual/latest/camel-3-migration-guide.html# > > _m > > igrating_custom_components > > > > Il giorno mar 3 dic 2019 alle ore 12:59 > > ha > > scritto: > > > > > Hi, > > > > > > I got this error. What is missing? > > > > > > java.lang.NoClassDefFoundError: > > > org/apache/camel/impl/DefaultComponent > > > > > > Stacktrace: > > > > > > java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent > > > at java.base/java.lang.ClassLoader.defineClass1(Native > > > Method) ~[na:na] > > > at > > > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) > > > ~[na:na] > > > at > > > java.base/java.security.SecureClassLoader.defineClass(SecureClassL > > > oa > > > de > > > r.java:174) > > > ~[na:na] > > > at > > > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Built > > > in > > > Cl > > > assLoader.java:802) > > > ~[na:na] > > > at > > > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassP > > > at > > > hO > > > rNull(BuiltinClassLoader.java:700) > > > ~[na:na] > > > at > > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(B > > > ui > > > lt > > > inClassLoader.java:623) > > > ~[na:na] > > > at > > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Builtin > > > Cl > > > as > > > sLoader.java:581) > > > ~[na:na] > > > at > > > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClas > > > s( > > > Cl > > > assLoaders.java:178) > > > ~[na:na] > > > at > > > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) > > > ~[na:na] > > > at > > > org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:4 > > > 74 > > > ) > > > ~[camel-util-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378 > > > ) > > > ~[camel-util-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355 > > > ) > > > ~[camel-util-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultClassResolver.loadClass(Defaul > > > tC > > > la > > > ssResolver.java:140) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(Def > > > au > > > lt > > > ClassResolver.java:55) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(De > > > fa > > > ul > > > tFactoryFinder.java:120) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass > > > $0 > > > (D > > > efaultFactoryFinder.java:77) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultF > > > ac > > > to > > > ryFinder.java:155) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultF > > > ac > > > to > > > ryFinder.java:151) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(C > > > on > > > cu > > > rrentHashMap.java:1705) > > > ~[na:na] > > > at > > > org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(De > > > fa > > > ul > > > tFactoryFinder.java:151) > > > ~[camel-base-3.0.0.jar:3.0.0] > > > at > > > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(Defaul > > > tF > >
AW: DefaultComponent
Its not my components. Its spring boot or flowable. But I cannot see in dependeny tree where flowble-camel uses camel-core or camel-support. When I patch the classes DefaultComponent /-Consumer etc. it works. -Ursprüngliche Nachricht- Von: Claus Ibsen Gesendet: Dienstag, 3. Dezember 2019 13:29 An: users@camel.apache.org Betreff: Re: DefaultComponent Hi If you have custom components you need to source code migrate them to Camel 3 and rebuild them. Camel 3 does not run with Camel 2 components. On Tue, Dec 3, 2019 at 1:21 PM wrote: > > Yes. I know and my own components use this. But it seems spring or flowable > needs this class there. > > > -Ursprüngliche Nachricht- > Von: Andrea Cosentino > Gesendet: Dienstag, 3. Dezember 2019 13:01 > An: users@camel.apache.org > Cc: dev > Betreff: Re: DefaultComponent > > In Camel 3 the DefaultComponent is located at > > org.apache.camel.support > > It is reported in the migration guide > > https://camel.apache.org/manual/latest/camel-3-migration-guide.html#_m > igrating_custom_components > > Il giorno mar 3 dic 2019 alle ore 12:59 ha > scritto: > > > Hi, > > > > I got this error. What is missing? > > > > java.lang.NoClassDefFoundError: > > org/apache/camel/impl/DefaultComponent > > > > Stacktrace: > > > > java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent > > at java.base/java.lang.ClassLoader.defineClass1(Native > > Method) ~[na:na] > > at > > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na] > > at > > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoa > > de > > r.java:174) > > ~[na:na] > > at > > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Builtin > > Cl > > assLoader.java:802) > > ~[na:na] > > at > > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPat > > hO > > rNull(BuiltinClassLoader.java:700) > > ~[na:na] > > at > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Bui > > lt > > inClassLoader.java:623) > > ~[na:na] > > at > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinCl > > as > > sLoader.java:581) > > ~[na:na] > > at > > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass( > > Cl > > assLoaders.java:178) > > ~[na:na] > > at > > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) > > ~[na:na] > > at > > org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:474 > > ) > > ~[camel-util-3.0.0.jar:3.0.0] > > at > > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378) > > ~[camel-util-3.0.0.jar:3.0.0] > > at > > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355) > > ~[camel-util-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultClassResolver.loadClass(DefaultC > > la > > ssResolver.java:140) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(Defau > > lt > > ClassResolver.java:55) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(Defa > > ul > > tFactoryFinder.java:120) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass$0 > > (D > > efaultFactoryFinder.java:77) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFac > > to > > ryFinder.java:155) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFac > > to > > ryFinder.java:151) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Con > > cu > > rrentHashMap.java:1705) > > ~[na:na] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(Defa > > ul > > tFactoryFinder.java:151) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultF > > ac > > toryFinder.java:74) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultF > > ac > > toryFinder.java:66) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultComponentResolver.findComponent( > > De > > faultComponentResolver.java:83) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.DefaultComponentResolver.resolveCompone > > nt > > (DefaultComponentResolver.java:56) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.AbstractCamelContext.initComponent(Abst > > ra > > ctCamelContext.java:568) > > ~[camel-base-3.0.0.jar:3.0.0] > > at > > org.apache.camel.impl.engine.AbstractCamelContext.access$000(Abstrac > > tC > > amelContext.java:165) > > ~[camel-base-3.0.0.jar:3.0.0] >
AW: DefaultComponent
Yes. I know and my own components use this. But it seems spring or flowable needs this class there. -Ursprüngliche Nachricht- Von: Andrea Cosentino Gesendet: Dienstag, 3. Dezember 2019 13:01 An: users@camel.apache.org Cc: dev Betreff: Re: DefaultComponent In Camel 3 the DefaultComponent is located at org.apache.camel.support It is reported in the migration guide https://camel.apache.org/manual/latest/camel-3-migration-guide.html#_migrating_custom_components Il giorno mar 3 dic 2019 alle ore 12:59 ha scritto: > Hi, > > I got this error. What is missing? > > java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent > > Stacktrace: > > java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent > at java.base/java.lang.ClassLoader.defineClass1(Native Method) > ~[na:na] > at > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na] > at > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoade > r.java:174) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinCl > assLoader.java:802) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathO > rNull(BuiltinClassLoader.java:700) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Built > inClassLoader.java:623) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClas > sLoader.java:581) > ~[na:na] > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Cl > assLoaders.java:178) > ~[na:na] > at > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) > ~[na:na] > at > org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:474) > ~[camel-util-3.0.0.jar:3.0.0] > at > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378) > ~[camel-util-3.0.0.jar:3.0.0] > at > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355) > ~[camel-util-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultClassResolver.loadClass(DefaultCla > ssResolver.java:140) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(Default > ClassResolver.java:55) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(Defaul > tFactoryFinder.java:120) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass$0(D > efaultFactoryFinder.java:77) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFacto > ryFinder.java:155) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFacto > ryFinder.java:151) > ~[camel-base-3.0.0.jar:3.0.0] > at > java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Concu > rrentHashMap.java:1705) > ~[na:na] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(Defaul > tFactoryFinder.java:151) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFac > toryFinder.java:74) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFac > toryFinder.java:66) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultComponentResolver.findComponent(De > faultComponentResolver.java:83) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.DefaultComponentResolver.resolveComponent > (DefaultComponentResolver.java:56) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.AbstractCamelContext.initComponent(Abstra > ctCamelContext.java:568) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.AbstractCamelContext.access$000(AbstractC > amelContext.java:165) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCame > lContext.java:496) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCame > lContext.java:492) > ~[camel-base-3.0.0.jar:3.0.0] > at > java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Concu > rrentHashMap.java:1705) > ~[na:na] > at > org.apache.camel.impl.engine.AbstractCamelContext.getComponent(Abstrac > tCamelContext.java:492) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.AbstractCamelContext.getComponent(Abstrac > tCamelContext.java:468) > ~[camel-base-3.0.0.jar:3.0.0] > at > org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(Abstract > CamelContext.java:745) > ~[camel-base-3.0.0.jar:3.0.0] > at >
DefaultComponent
Hi, I got this error. What is missing? java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent Stacktrace: java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] at org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:474) ~[camel-util-3.0.0.jar:3.0.0] at org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378) ~[camel-util-3.0.0.jar:3.0.0] at org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355) ~[camel-util-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultClassResolver.loadClass(DefaultClassResolver.java:140) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(DefaultClassResolver.java:55) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(DefaultFactoryFinder.java:120) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass$0(DefaultFactoryFinder.java:77) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFactoryFinder.java:155) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFactoryFinder.java:151) ~[camel-base-3.0.0.jar:3.0.0] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[na:na] at org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(DefaultFactoryFinder.java:151) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:74) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:66) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultComponentResolver.findComponent(DefaultComponentResolver.java:83) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:56) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.AbstractCamelContext.initComponent(AbstractCamelContext.java:568) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.AbstractCamelContext.access$000(AbstractCamelContext.java:165) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCamelContext.java:496) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCamelContext.java:492) ~[camel-base-3.0.0.jar:3.0.0] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[na:na] at org.apache.camel.impl.engine.AbstractCamelContext.getComponent(AbstractCamelContext.java:492) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.AbstractCamelContext.getComponent(AbstractCamelContext.java:468) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:745) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:55) ~[camel-support-3.0.0.jar:3.0.0] at org.apache.camel.impl.engine.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:120) ~[camel-base-3.0.0.jar:3.0.0] at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:363) ~[camel-core-engine-3.0.0.jar:3.0.0] at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:108) ~[camel-core-engine-3.0.0.jar:3.0.0] at org.apache.camel.impl.DefaultModel.start(DefaultModel.java:356) ~[camel-core-engine-3.0.0.jar:3.0.0] at org.apache.camel.impl.DefaultModel.startRoute(DefaultModel.java:330) ~[camel-core-engine-3.0.0.jar:3.0.0] at
AW: [ANNOUNCEMENT] Apache Camel 3.0.0 Released
A. Thanks. Didn't expect this from 3.0.0-RC3 to 3.0.0 -Ursprüngliche Nachricht- Von: Andrea Cosentino Gesendet: Montag, 2. Dezember 2019 15:25 An: users@camel.apache.org Cc: dev Betreff: Re: [ANNOUNCEMENT] Apache Camel 3.0.0 Released The groupId of the starters has been changed from org.apache.camel to org.apache.camel.springboot https://search.maven.org/search?q=g:org.apache.camel.springboot Il giorno lun 2 dic 2019 alle ore 15:23 ha scritto: > Hi, > > But camel-spring-boot-starter is still 3.0.0-RC3 ? > > -Ursprüngliche Nachricht- > Von: Grzegorz Grzybek > Gesendet: Freitag, 29. November 2019 15:37 > An: users@camel.apache.org > Cc: d...@camel.apache.org > Betreff: Re: [ANNOUNCEMENT] Apache Camel 3.0.0 Released > > Congratulations! > > Time to celebrate - amazing work! > > regards > Grzegorz Grzybek > > pt., 29 lis 2019 o 03:56 Tadayoshi Sato > napisał(a): > > > Congratulations! It's an epic release indeed! > > > > Thanks everyone for making it happen! > > > > Best regards, > > Tadayoshi > > > > On Thu, Nov 28, 2019 at 11:13 PM Gregor Zurowski > > > > > > wrote: > > > > > It's finally here - after four release candidates and three > > > milestone releases, the Camel community announces the immediate > > > availability of Camel 3.0.0, a new major release with over 1000 > > > new features, improvements and fixes. > > > > > > Please read our migration guide [1] that describes how to upgrade > > > Camel 2.x applications to Camel 3.0. > > > > > > The artifacts are published and ready for you to download [2] > > > either from the Apache mirrors or from the Central Maven > > > repository. For more details please take a look at the release notes [3, > > > 4]. > > > > > > Many thanks to all who made this release possible. > > > > > > On behalf of the Camel PMC, > > > Gregor Zurowski > > > > > > [1] > > > https://camel.apache.org/manual/latest/camel-3-migration-guide.htm > > > l [1] http://camel.apache.org/download.html > > > [2] https://camel.apache.org/blog/release-3-0-0.html > > > [3] > > > > > https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12315 > > 69 > > 1=12311211 > > > > > > > > > -- > > Tadayoshi Sato > > >
AW: [ANNOUNCEMENT] Apache Camel 3.0.0 Released
Hi, But camel-spring-boot-starter is still 3.0.0-RC3 ? -Ursprüngliche Nachricht- Von: Grzegorz Grzybek Gesendet: Freitag, 29. November 2019 15:37 An: users@camel.apache.org Cc: d...@camel.apache.org Betreff: Re: [ANNOUNCEMENT] Apache Camel 3.0.0 Released Congratulations! Time to celebrate - amazing work! regards Grzegorz Grzybek pt., 29 lis 2019 o 03:56 Tadayoshi Sato napisał(a): > Congratulations! It's an epic release indeed! > > Thanks everyone for making it happen! > > Best regards, > Tadayoshi > > On Thu, Nov 28, 2019 at 11:13 PM Gregor Zurowski > > > wrote: > > > It's finally here - after four release candidates and three > > milestone releases, the Camel community announces the immediate > > availability of Camel 3.0.0, a new major release with over 1000 new > > features, improvements and fixes. > > > > Please read our migration guide [1] that describes how to upgrade > > Camel 2.x applications to Camel 3.0. > > > > The artifacts are published and ready for you to download [2] either > > from the Apache mirrors or from the Central Maven repository. For > > more details please take a look at the release notes [3, 4]. > > > > Many thanks to all who made this release possible. > > > > On behalf of the Camel PMC, > > Gregor Zurowski > > > > [1] > > https://camel.apache.org/manual/latest/camel-3-migration-guide.html > > [1] http://camel.apache.org/download.html > > [2] https://camel.apache.org/blog/release-3-0-0.html > > [3] > > > https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=1231569 > 1=12311211 > > > > > -- > Tadayoshi Sato >
parse HTML Email
Hi, is there a build in way to parse HTML and RTF Emails. I simply need a plain text. Only what I found was to unmarshall into different message-part. Thomas
AW: NoClassDefFoundError: DefaultComponent 3.0.0-RC1
Actually that is what I suppose. Or camel - 3.0.0 is buggy. -Ursprüngliche Nachricht- Von: Andrea Cosentino Gesendet: Mittwoch, 2. Oktober 2019 15:00 An: users@camel.apache.org Betreff: Re: NoClassDefFoundError: DefaultComponent 3.0.0-RC1 If you are moving to camel 3 probably you have some wrong dependencies somewhere. Il giorno mer 2 ott 2019 alle ore 14:54 ha scritto: > Hi > > I thought I did this. I use this. > Snipped. > I suspect someone else, may be from spring, uses this *at rumtime*. > Its not a compile error. > > --- > import java.util.Map; > import org.apache.camel.Endpoint; > import org.apache.camel.support.DefaultComponent; > import org.springframework.beans.factory.annotation.Autowired; > import org.springframework.stereotype.Component; > > //** > //* MonitorComponent > //* > //* cpmponent for monitoring > //* > //* create the monitoring endpoint > //** > @Component("monitoring") > public class MonitorComponent extends DefaultComponent { > > --- > > > -Ursprüngliche Nachricht- > Von: Claus Ibsen > Gesendet: Mittwoch, 2. Oktober 2019 14:09 > An: users@camel.apache.org > Betreff: Re: NoClassDefFoundError: DefaultComponent 3.0.0-RC1 > > Hi > > If you have custom components you need to migrate and recompile them. > > See the migration guide > https://camel.apache.org/manual/latest/camel-3-migration-guide.html > > On Wed, Oct 2, 2019 at 2:02 PM wrote: > > > > Hello > > > > I get this error when upgrading to 3.0.0-RC1 > > > > As far as I noticed DefaultComponent moved to support instead of impl. > > Who wants org/apache/camel/impl/DefaultComponent? > > > > Thomas > > > > > > java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent > > at java.base/java.lang.ClassLoader.defineClass1(Native > > Method) > ~[na:na] > > at > java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) > ~[na:na] > > at > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoade > r.java:174) > ~[na:na] > > at > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinCl > assLoader.java:802) > ~[na:na] > > at > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathO > rNull(BuiltinClassLoader.java:700) > ~[na:na] > > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Built > inClassLoader.java:623) > ~[na:na] > > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClas > sLoader.java:581) > ~[na:na] > > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Cl > assLoaders.java:178) > ~[na:na] > > at > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) > ~[na:na] > > at > org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:474) > ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378) > ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355) > ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultClassResolver.loadClass(DefaultCla > ssResolver.java:140) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(Default > ClassResolver.java:55) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(Defaul > tFactoryFinder.java:120) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass$0(D > efaultFactoryFinder.java:77) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFacto > ryFinder.java:155) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFacto > ryFinder.java:151) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Concu > rrentHashMap.java:1705) > ~[na:na] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(Defaul > tFactoryFinder.java:151) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFac > toryFinder.java:74) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFac > toryFinder.java:66) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at > org.apache.camel.impl.engine.DefaultComponentResolver.findComponent(De > faultComponentResolver.java:83) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > > at >
AW: NoClassDefFoundError: DefaultComponent 3.0.0-RC1
Hi I thought I did this. I use this. Snipped. I suspect someone else, may be from spring, uses this *at rumtime*. Its not a compile error. --- import java.util.Map; import org.apache.camel.Endpoint; import org.apache.camel.support.DefaultComponent; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; //** //* MonitorComponent //* //* cpmponent for monitoring //* //* create the monitoring endpoint //** @Component("monitoring") public class MonitorComponent extends DefaultComponent { --- -Ursprüngliche Nachricht- Von: Claus Ibsen Gesendet: Mittwoch, 2. Oktober 2019 14:09 An: users@camel.apache.org Betreff: Re: NoClassDefFoundError: DefaultComponent 3.0.0-RC1 Hi If you have custom components you need to migrate and recompile them. See the migration guide https://camel.apache.org/manual/latest/camel-3-migration-guide.html On Wed, Oct 2, 2019 at 2:02 PM wrote: > > Hello > > I get this error when upgrading to 3.0.0-RC1 > > As far as I noticed DefaultComponent moved to support instead of impl. > Who wants org/apache/camel/impl/DefaultComponent? > > Thomas > > > java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent > at java.base/java.lang.ClassLoader.defineClass1(Native Method) > ~[na:na] > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) > ~[na:na] > at > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) > ~[na:na] > at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) > ~[na:na] > at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) > ~[na:na] > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) > ~[na:na] > at > org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:474) > ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378) > ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355) > ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultClassResolver.loadClass(DefaultClassResolver.java:140) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(DefaultClassResolver.java:55) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(DefaultFactoryFinder.java:120) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass$0(DefaultFactoryFinder.java:77) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFactoryFinder.java:155) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFactoryFinder.java:151) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) > ~[na:na] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(DefaultFactoryFinder.java:151) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:74) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:66) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultComponentResolver.findComponent(DefaultComponentResolver.java:83) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:56) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.AbstractCamelContext.initComponent(AbstractCamelContext.java:565) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.AbstractCamelContext.access$000(AbstractCamelContext.java:164) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at > org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCamelContext.java:493) > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] > at >
NoClassDefFoundError: DefaultComponent 3.0.0-RC1
Hello I get this error when upgrading to 3.0.0-RC1 As far as I noticed DefaultComponent moved to support instead of impl. Who wants org/apache/camel/impl/DefaultComponent? Thomas java.lang.NoClassDefFoundError: org/apache/camel/impl/DefaultComponent at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] at org.apache.camel.util.ObjectHelper.doLoadClass(ObjectHelper.java:474) ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:378) ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.util.ObjectHelper.loadClass(ObjectHelper.java:355) ~[camel-util-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultClassResolver.loadClass(DefaultClassResolver.java:140) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultClassResolver.resolveClass(DefaultClassResolver.java:55) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultFactoryFinder.doNewInstance(DefaultFactoryFinder.java:120) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultFactoryFinder.lambda$findClass$0(DefaultFactoryFinder.java:77) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFactoryFinder.java:155) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultFactoryFinder$1.apply(DefaultFactoryFinder.java:151) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[na:na] at org.apache.camel.impl.engine.DefaultFactoryFinder.addToClassMap(DefaultFactoryFinder.java:151) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:74) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultFactoryFinder.findClass(DefaultFactoryFinder.java:66) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultComponentResolver.findComponent(DefaultComponentResolver.java:83) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:56) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.AbstractCamelContext.initComponent(AbstractCamelContext.java:565) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.AbstractCamelContext.access$000(AbstractCamelContext.java:164) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCamelContext.java:493) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCamelContext.java:489) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[na:na] at org.apache.camel.impl.engine.AbstractCamelContext.getComponent(AbstractCamelContext.java:489) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.AbstractCamelContext.getComponent(AbstractCamelContext.java:465) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:742) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:55) ~[camel-support-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.engine.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:120) ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:349) ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:101) ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] at org.apache.camel.impl.DefaultModel.start(DefaultModel.java:346)
AW: Email to dead letter channel
Thank you, Giovanni. This works. Maybe you can give me a hint how to deal with the same approach when splitting. Pseudocode errorHandler(deadLetterChannel(String.format("file://dead")).useOriginalMessage()); from (in).split() .choice() .when (type == 0) .bean(Doing.class) //throws Ex1 .to(Agg) .otherwise() .bean(SomethingElse.class) //throws Ex2 .to(Agg) .endChoice() from(Agg) .bean(Check.class) //throws Ex3 .to(foo) When Exception 1 or 2 is throw the original Message (e.g. a zip) is copied into dead-dir. But after the aggregation, Exception 3, this info gets lost. How to realizes this? What is missing? Regards Thomas -Ursprüngliche Nachricht- Von: Giovanni Condello Gesendet: Donnerstag, 19. September 2019 19:05 An: users@camel.apache.org Betreff: R: Email to dead letter channel I see, i missed the formatting part and skipped right to the attachments. In this case, I would try something like was sugggested here: https://stackoverflow.com/questions/56577633/apache-camel-save-email-to-file-eml-using-routes e.g (tested locally) public void configure() throws Exception { errorHandler(deadLetterChannel("direct:deadletter").useOriginalMessage()); from("imaps://.") .routeId("EmailInput") .throwException(IllegalArgumentException.class, "test") .to("direct:emailin"); from("direct:emailin") .log("This will never fire"); from("direct:deadletter") .log("Got an email!") .process(ex -> { javax.mail.Message mailMessage = ex.getIn(org.apache.camel.component.mail.MailMessage.class).getMessage(); ex.getMessage().setHeader(Exchange.FILE_NAME, String.format("%s.eml", ex.getExchangeId())); try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { mailMessage.writeTo(baos); ex.getMessage().setBody(baos.toByteArray()); } }) .to("file:deadLetter"); } Da: thomas.thi...@telekom.de Inviato: giovedì 19 settembre 2019 18:18 A: users@camel.apache.org Oggetto: AW: Email to dead letter channel No. The body is not stored as it come. But text only. Without formatting (e.g. RTF). I simply want to backup the original Email as eml in case of error. -Ursprüngliche Nachricht- Von: Condello, Giovanni Gesendet: Donnerstag, 19. September 2019 15:47 An: users@camel.apache.org Betreff: Re: Email to dead letter channel Hi, My guess is that the file component doesn't support the attachments API (as noted here: https://camel.apache.org/components/latest/mail-component.html#_sending_mail_with_attachment_sample ). One trick could be to route your deadLetterChannel to a direct route, and from there use: 1. the file component to store the body on disk (as you are doing right now) 2. the splitter EIP to iterate over the attachments using the SplitAttachmentsExpression(true) ( https://camel.apache.org/components/latest/mail-component.html#_how_to_split_a_mail_message_with_attachments) and then store them on disk as well by setting the appropriate file component headers using the CamelSplitAttachmentId exchange header to recover the attachment name. Giovanni Il giorno gio 19 set 2019 alle ore 13:25 ha scritto: > Hi, > > I send an email with formatting, html or rtf and a pdf as attachment. > But in the dead letter file there is only plain text. > How can I save the orginal email in case of exception? > > Code so far in configure(): > > errorHandler(deadLetterChannel(String.format("file://%s", > EMAIL_DEADDIRECTORY)).useOriginalMessage()); > > from(("imap:// ...").routeId("EmailInput") >.throwException(IllegalArgumentException.class, "test") >.to("direct:emailin"); > > >
AW: Email to dead letter channel
No. The body is not stored as it come. But text only. Without formatting (e.g. RTF). I simply want to backup the original Email as eml in case of error. -Ursprüngliche Nachricht- Von: Condello, Giovanni Gesendet: Donnerstag, 19. September 2019 15:47 An: users@camel.apache.org Betreff: Re: Email to dead letter channel Hi, My guess is that the file component doesn't support the attachments API (as noted here: https://camel.apache.org/components/latest/mail-component.html#_sending_mail_with_attachment_sample ). One trick could be to route your deadLetterChannel to a direct route, and from there use: 1. the file component to store the body on disk (as you are doing right now) 2. the splitter EIP to iterate over the attachments using the SplitAttachmentsExpression(true) ( https://camel.apache.org/components/latest/mail-component.html#_how_to_split_a_mail_message_with_attachments) and then store them on disk as well by setting the appropriate file component headers using the CamelSplitAttachmentId exchange header to recover the attachment name. Giovanni Il giorno gio 19 set 2019 alle ore 13:25 ha scritto: > Hi, > > I send an email with formatting, html or rtf and a pdf as attachment. > But in the dead letter file there is only plain text. > How can I save the orginal email in case of exception? > > Code so far in configure(): > > errorHandler(deadLetterChannel(String.format("file://%s", > EMAIL_DEADDIRECTORY)).useOriginalMessage()); > > from(("imap:// ...").routeId("EmailInput") >.throwException(IllegalArgumentException.class, "test") >.to("direct:emailin"); > > >
AW: own endpoint exmaple?
Thanks. Will look at it. -Ursprüngliche Nachricht- Von: Condello, Giovanni Gesendet: Donnerstag, 19. September 2019 13:55 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? A couple of suggestions from someone that had to build a custom component: - Use the archetype to generate a skelton, then modify the pom to integrate it back into your own structure. We did it and we found the process quite straightforward. - Find an existing camel component that works in a similar way to yours and use it as an "inspiration" and as a reference. For simpler projects (or one-offs) we usually just load a shared RouteBuilder end expose the routes via a standard camel endpoint (e.g. direct) Hope it helps Il gio 19 set 2019, 13:43 ha scritto: > Simply hide a complex monitoring (db-entries, log, etc.) with a simple > call like "file://" "log:". > I could use a bean or processor and I actually I had, but I thought > its simplier so. For the caller (routedef) and for clean code. > > > -Ursprüngliche Nachricht- > Von: Omar Al-Safi > Gesendet: Donnerstag, 19. September 2019 13:28 > An: users@camel.apache.org > Betreff: Re: own endpoint exmaple? > > Hi Thomas, > > May I know what do you want to achieve here? The context of your > problem can help us to know how can you move forward without much > complexity involved. > > Regards, > Omar > > On Thu, Sep 19, 2019, 13:20 wrote: > > > "Scaffolding your component through maven archetype" > > > > I think at the moment I didn’t know much about it. > > I really didn’t want to blow up pom only for a little endpoint. Or > > did I not get it? > > > > > > -Ursprüngliche Nachricht- > > Von: Alex Dettinger > > Gesendet: Donnerstag, 19. September 2019 10:20 > > An: users@camel.apache.org > > Betreff: Re: own endpoint exmaple? > > > > Hi Thomas, > > > > Did you figured it out ? > > From the code, it's hard to see what the issue could be: Do you > > extend DefaultComponent ? Do you call setProperties() in > > createEndpoint() ? and so on... > > If you have not used an archetype yet, then I would direct you > > back to Omar Al-Safi suggestion: Scaffolding your component through > > maven archetype > https://camel.apache.org/manual/latest/camel-maven-archetypes.html. > > You'll then have a proper layout to start on then. > > > > Alex > > > > > > On Tue, Sep 17, 2019 at 12:49 PM wrote: > > > > > Hi, > > > > > > thanks so far. I didn’t know that I had to explicitely create a > > Component. > > > The direct example helped a lot. > > > But there is this contruct, and it will not work with my code. > > > name is not set. (it has getter and setter) > > > > > > I want that name is "thomas" when route-def is like > > > > > > to("monitoring:thomas") > > > > > > @UriEndpoint(scheme = "monitoring", title = "monitoring", > > > syntax="monitoring:name", label = "Monitoring") public class > > > MonitorEndpoint extends DefaultEndpoint { > > > @UriPath > > > @Metadata(required = true) > > > private String name; > > > > > > public MonitorEndpoint() { > > > } > > > > > > public MonitorEndpoint(final String endpointUri, final Component > > > component) { > > > super(endpointUri, component); > > > } > > > > > > @Override > > > public Consumer createConsumer(Processor processor) throws > > > Exception > { > > > // TODO Auto-generated method stub > > > return null; > > > } > > > > > > > > > > > > > > > > > > > > > -Ursprüngliche Nachricht- > > > Von: Omar Al-Safi > > > Gesendet: Montag, 16. September 2019 13:05 > > > An: users@camel.apache.org > > > Betreff: Re: own endpoint exmaple? > > > > > > I see, yeah we will need to fix this. By the way, you can start > > > scaffolding your component through maven archetype, > > > https://camel.apache.org/manual/latest/camel-maven-archetypes.html > > > , as I recall, it will also add the necessary files to enable > > > camel auto discovery out of the box > > > > > > On Mon, 16 Sep 2019 at 13:01, Alex Dettinger > > > > > > wrote: > > > > > > > Also, the source code of the direct component could be a good > > > > starter to get inspiration: > > > > > > > > https://github.com/apache/camel/tree/master/components/camel-dir > > > > ec t/ sr c/main/java/org/apache/camel/component/direct > > > > > > > > Alex > > > > > > > > On Mon, Sep 16, 2019 at 12:57 PM Steve Huston > > > > > > > > wrote: > > > > > > > > > Is it possible that Spring is not finding your endpoint class? > > > > > > > > > > -Steve > > > > > > > > > > On 9/16/19, 6:55 AM, "thomas.thi...@telekom.de" < > > > > thomas.thi...@telekom.de> > > > > > wrote: > > > > > > > > > > Hi Alex, > > > > > > > > > > 1. I found this webpage but the links (e.g. > > > > > createProducer()) goes to "page not found". > > > > > > > > > > 2. Stupid question: how and where to do this? > > > > > > > > > > -Ursprüngliche Nachricht- > > > > > Von: Alex Dettinger > > > > > Gesendet: Montag, 16.
AW: own endpoint exmaple?
Simply hide a complex monitoring (db-entries, log, etc.) with a simple call like "file://" "log:". I could use a bean or processor and I actually I had, but I thought its simplier so. For the caller (routedef) and for clean code. -Ursprüngliche Nachricht- Von: Omar Al-Safi Gesendet: Donnerstag, 19. September 2019 13:28 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? Hi Thomas, May I know what do you want to achieve here? The context of your problem can help us to know how can you move forward without much complexity involved. Regards, Omar On Thu, Sep 19, 2019, 13:20 wrote: > "Scaffolding your component through maven archetype" > > I think at the moment I didn’t know much about it. > I really didn’t want to blow up pom only for a little endpoint. Or did > I not get it? > > > -Ursprüngliche Nachricht- > Von: Alex Dettinger > Gesendet: Donnerstag, 19. September 2019 10:20 > An: users@camel.apache.org > Betreff: Re: own endpoint exmaple? > > Hi Thomas, > > Did you figured it out ? > From the code, it's hard to see what the issue could be: Do you > extend DefaultComponent ? Do you call setProperties() in > createEndpoint() ? and so on... > If you have not used an archetype yet, then I would direct you back > to Omar Al-Safi suggestion: Scaffolding your component through maven > archetype https://camel.apache.org/manual/latest/camel-maven-archetypes.html. > You'll then have a proper layout to start on then. > > Alex > > > On Tue, Sep 17, 2019 at 12:49 PM wrote: > > > Hi, > > > > thanks so far. I didn’t know that I had to explicitely create a > Component. > > The direct example helped a lot. > > But there is this contruct, and it will not work with my code. > > name is not set. (it has getter and setter) > > > > I want that name is "thomas" when route-def is like > > > > to("monitoring:thomas") > > > > @UriEndpoint(scheme = "monitoring", title = "monitoring", > > syntax="monitoring:name", label = "Monitoring") public class > > MonitorEndpoint extends DefaultEndpoint { > > @UriPath > > @Metadata(required = true) > > private String name; > > > > public MonitorEndpoint() { > > } > > > > public MonitorEndpoint(final String endpointUri, final Component > > component) { > > super(endpointUri, component); > > } > > > > @Override > > public Consumer createConsumer(Processor processor) throws Exception { > > // TODO Auto-generated method stub > > return null; > > } > > > > > > > > > > > > > > -Ursprüngliche Nachricht- > > Von: Omar Al-Safi > > Gesendet: Montag, 16. September 2019 13:05 > > An: users@camel.apache.org > > Betreff: Re: own endpoint exmaple? > > > > I see, yeah we will need to fix this. By the way, you can start > > scaffolding your component through maven archetype, > > https://camel.apache.org/manual/latest/camel-maven-archetypes.html, > > as I recall, it will also add the necessary files to enable camel > > auto discovery out of the box > > > > On Mon, 16 Sep 2019 at 13:01, Alex Dettinger > > wrote: > > > > > Also, the source code of the direct component could be a good > > > starter to get inspiration: > > > > > > https://github.com/apache/camel/tree/master/components/camel-direc > > > t/ sr c/main/java/org/apache/camel/component/direct > > > > > > Alex > > > > > > On Mon, Sep 16, 2019 at 12:57 PM Steve Huston > > > > > > wrote: > > > > > > > Is it possible that Spring is not finding your endpoint class? > > > > > > > > -Steve > > > > > > > > On 9/16/19, 6:55 AM, "thomas.thi...@telekom.de" < > > > thomas.thi...@telekom.de> > > > > wrote: > > > > > > > > Hi Alex, > > > > > > > > 1. I found this webpage but the links (e.g. > > > > createProducer()) goes to "page not found". > > > > > > > > 2. Stupid question: how and where to do this? > > > > > > > > -Ursprüngliche Nachricht- > > > > Von: Alex Dettinger > > > > Gesendet: Montag, 16. September 2019 12:52 > > > > An: users@camel.apache.org > > > > Betreff: Re: own endpoint exmaple? > > > > > > > > Hi Thomas, > > > > > > > > This link might be of interest: > > > > > > > > https://camel.apache.org/manual/latest/writing-components.html > > > > > > > > In your case, I wonder if you missed to create the thomas > > > > component first. > > > > > > > > hth, > > > > Alex > > > > > > > > On Mon, Sep 16, 2019 at 12:44 PM > wrote: > > > > > > > > > Hi, > > > > > > > > > > can some point me to a working example where an own > > > > endpoint was created. > > > > > > > > > > In route I say: > > > > > > > > > > .to("thomas://foo") > > > > > > > > > > my Endpoint is > > > > > > > > > > @Component > > > > > @UriEndpoint(scheme = "thomas", title = "Thiele", > > > > > syntax="thomas:name", label = "Thomas") public class ThomasStep > > > > > extends DefaultEndpoint {} > > > > > > > > > > But I get. > > > > > > > > > >
Email to dead letter channel
Hi, I send an email with formatting, html or rtf and a pdf as attachment. But in the dead letter file there is only plain text. How can I save the orginal email in case of exception? Code so far in configure(): errorHandler(deadLetterChannel(String.format("file://%s", EMAIL_DEADDIRECTORY)).useOriginalMessage()); from(("imap:// ...").routeId("EmailInput") .throwException(IllegalArgumentException.class, "test") .to("direct:emailin");
AW: own endpoint exmaple?
"Scaffolding your component through maven archetype" I think at the moment I didn’t know much about it. I really didn’t want to blow up pom only for a little endpoint. Or did I not get it? -Ursprüngliche Nachricht- Von: Alex Dettinger Gesendet: Donnerstag, 19. September 2019 10:20 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? Hi Thomas, Did you figured it out ? From the code, it's hard to see what the issue could be: Do you extend DefaultComponent ? Do you call setProperties() in createEndpoint() ? and so on... If you have not used an archetype yet, then I would direct you back to Omar Al-Safi suggestion: Scaffolding your component through maven archetype https://camel.apache.org/manual/latest/camel-maven-archetypes.html. You'll then have a proper layout to start on then. Alex On Tue, Sep 17, 2019 at 12:49 PM wrote: > Hi, > > thanks so far. I didn’t know that I had to explicitely create a Component. > The direct example helped a lot. > But there is this contruct, and it will not work with my code. > name is not set. (it has getter and setter) > > I want that name is "thomas" when route-def is like > > to("monitoring:thomas") > > @UriEndpoint(scheme = "monitoring", title = "monitoring", > syntax="monitoring:name", label = "Monitoring") public class > MonitorEndpoint extends DefaultEndpoint { > @UriPath > @Metadata(required = true) > private String name; > > public MonitorEndpoint() { > } > > public MonitorEndpoint(final String endpointUri, final Component > component) { > super(endpointUri, component); > } > > @Override > public Consumer createConsumer(Processor processor) throws Exception { > // TODO Auto-generated method stub > return null; > } > > > > > > > -Ursprüngliche Nachricht- > Von: Omar Al-Safi > Gesendet: Montag, 16. September 2019 13:05 > An: users@camel.apache.org > Betreff: Re: own endpoint exmaple? > > I see, yeah we will need to fix this. By the way, you can start > scaffolding your component through maven archetype, > https://camel.apache.org/manual/latest/camel-maven-archetypes.html, as > I recall, it will also add the necessary files to enable camel auto > discovery out of the box > > On Mon, 16 Sep 2019 at 13:01, Alex Dettinger > wrote: > > > Also, the source code of the direct component could be a good > > starter to get inspiration: > > > > https://github.com/apache/camel/tree/master/components/camel-direct/ > > sr c/main/java/org/apache/camel/component/direct > > > > Alex > > > > On Mon, Sep 16, 2019 at 12:57 PM Steve Huston > > wrote: > > > > > Is it possible that Spring is not finding your endpoint class? > > > > > > -Steve > > > > > > On 9/16/19, 6:55 AM, "thomas.thi...@telekom.de" < > > thomas.thi...@telekom.de> > > > wrote: > > > > > > Hi Alex, > > > > > > 1. I found this webpage but the links (e.g. createProducer()) > > > goes to "page not found". > > > > > > 2. Stupid question: how and where to do this? > > > > > > -Ursprüngliche Nachricht- > > > Von: Alex Dettinger > > > Gesendet: Montag, 16. September 2019 12:52 > > > An: users@camel.apache.org > > > Betreff: Re: own endpoint exmaple? > > > > > > Hi Thomas, > > > > > > This link might be of interest: > > > > > > https://camel.apache.org/manual/latest/writing-components.html > > > > > > In your case, I wonder if you missed to create the thomas > > > component first. > > > > > > hth, > > > Alex > > > > > > On Mon, Sep 16, 2019 at 12:44 PM wrote: > > > > > > > Hi, > > > > > > > > can some point me to a working example where an own endpoint > > > was created. > > > > > > > > In route I say: > > > > > > > > .to("thomas://foo") > > > > > > > > my Endpoint is > > > > > > > > @Component > > > > @UriEndpoint(scheme = "thomas", title = "Thiele", > > > > syntax="thomas:name", label = "Thomas") public class ThomasStep > > > > extends DefaultEndpoint {} > > > > > > > > But I get. > > > > > > > > thomas://name due to: No component found with scheme: thomas > > > > > > > > > > > > > > > >
AW: own endpoint exmaple?
Hi, thanks so far. I didn’t know that I had to explicitely create a Component. The direct example helped a lot. But there is this contruct, and it will not work with my code. name is not set. (it has getter and setter) I want that name is "thomas" when route-def is like to("monitoring:thomas") @UriEndpoint(scheme = "monitoring", title = "monitoring", syntax="monitoring:name", label = "Monitoring") public class MonitorEndpoint extends DefaultEndpoint { @UriPath @Metadata(required = true) private String name; public MonitorEndpoint() { } public MonitorEndpoint(final String endpointUri, final Component component) { super(endpointUri, component); } @Override public Consumer createConsumer(Processor processor) throws Exception { // TODO Auto-generated method stub return null; } -Ursprüngliche Nachricht- Von: Omar Al-Safi Gesendet: Montag, 16. September 2019 13:05 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? I see, yeah we will need to fix this. By the way, you can start scaffolding your component through maven archetype, https://camel.apache.org/manual/latest/camel-maven-archetypes.html, as I recall, it will also add the necessary files to enable camel auto discovery out of the box On Mon, 16 Sep 2019 at 13:01, Alex Dettinger wrote: > Also, the source code of the direct component could be a good starter > to get inspiration: > > https://github.com/apache/camel/tree/master/components/camel-direct/sr > c/main/java/org/apache/camel/component/direct > > Alex > > On Mon, Sep 16, 2019 at 12:57 PM Steve Huston > wrote: > > > Is it possible that Spring is not finding your endpoint class? > > > > -Steve > > > > On 9/16/19, 6:55 AM, "thomas.thi...@telekom.de" < > thomas.thi...@telekom.de> > > wrote: > > > > Hi Alex, > > > > 1. I found this webpage but the links (e.g. createProducer()) > > goes to "page not found". > > > > 2. Stupid question: how and where to do this? > > > > -Ursprüngliche Nachricht- > > Von: Alex Dettinger > > Gesendet: Montag, 16. September 2019 12:52 > > An: users@camel.apache.org > > Betreff: Re: own endpoint exmaple? > > > > Hi Thomas, > > > > This link might be of interest: > > https://camel.apache.org/manual/latest/writing-components.html > > > > In your case, I wonder if you missed to create the thomas > > component first. > > > > hth, > > Alex > > > > On Mon, Sep 16, 2019 at 12:44 PM wrote: > > > > > Hi, > > > > > > can some point me to a working example where an own endpoint > > was created. > > > > > > In route I say: > > > > > > .to("thomas://foo") > > > > > > my Endpoint is > > > > > > @Component > > > @UriEndpoint(scheme = "thomas", title = "Thiele", > > > syntax="thomas:name", label = "Thomas") public class ThomasStep > > > extends DefaultEndpoint {} > > > > > > But I get. > > > > > > thomas://name due to: No component found with scheme: thomas > > > > > > > > > >
AW: own endpoint exmaple?
Hi, the problem is that a lot of links on the page you are mentionend, are dead ("page not found"). I should have told that in the first posting. I use spring so I hoped spring will find it. I will look at the examples. Thanks. -Ursprüngliche Nachricht- Von: Omar Al-Safi Gesendet: Montag, 16. September 2019 12:57 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? If I understand correctly, you want to create your own component, is that correct? If that is the case, please check here: https://camel.apache.org/manual/latest/writing-components.html. Basically you will need to either: - Add add a file to META-INF/services/org/apache/camel/component/FOO to enable the auto-discovery per the docs. - Or initiate the component manually and add it to camel context, you can take a look an example here: https://github.com/apache/camel/blob/master/examples/camel-example-artemis/src/main/java/org/apache/camel/example/artemis/ArtemisMain.java#L39 or here: https://github.com/apache/camel/blob/master/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/BaseEmbeddedKafkaTest.java#L81 regards On Mon, 16 Sep 2019 at 12:44, wrote: > Hi, > > can some point me to a working example where an own endpoint was created. > > In route I say: > > .to("thomas://foo") > > my Endpoint is > > @Component > @UriEndpoint(scheme = "thomas", title = "Thiele", > syntax="thomas:name", label = "Thomas") public class ThomasStep > extends DefaultEndpoint {} > > But I get. > > thomas://name due to: No component found with scheme: thomas >
AW: own endpoint exmaple?
Hi Alex, 1. I found this webpage but the links (e.g. createProducer()) goes to "page not found". 2. Stupid question: how and where to do this? -Ursprüngliche Nachricht- Von: Alex Dettinger Gesendet: Montag, 16. September 2019 12:52 An: users@camel.apache.org Betreff: Re: own endpoint exmaple? Hi Thomas, This link might be of interest: https://camel.apache.org/manual/latest/writing-components.html In your case, I wonder if you missed to create the thomas component first. hth, Alex On Mon, Sep 16, 2019 at 12:44 PM wrote: > Hi, > > can some point me to a working example where an own endpoint was created. > > In route I say: > > .to("thomas://foo") > > my Endpoint is > > @Component > @UriEndpoint(scheme = "thomas", title = "Thiele", > syntax="thomas:name", label = "Thomas") public class ThomasStep > extends DefaultEndpoint {} > > But I get. > > thomas://name due to: No component found with scheme: thomas >
own endpoint exmaple?
Hi, can some point me to a working example where an own endpoint was created. In route I say: .to("thomas://foo") my Endpoint is @Component @UriEndpoint(scheme = "thomas", title = "Thiele", syntax="thomas:name", label = "Thomas") public class ThomasStep extends DefaultEndpoint {} But I get. thomas://name due to: No component found with scheme: thomas