Also, what is org.springframework.stereotype.Component ? You need to use org.apache.camel.spi.annotations.Component
Il giorno mer 2 ott 2019 alle ore 15:27 Andrea Cosentino <anco...@gmail.com> ha scritto: > We don't have enough information here to understand what you're doing, we > just have a class with a declaration and some imports. > > Maybe you can put your project on github and we can take a look. > > I don't think camel 3.0.0-RC1 is buggie, I'm more inclined to think you > didn't follow the migration guide, but it could be there is a bug. This > should have been noticed with 4 milestones and one RC. So it seems a bit > weird. > > Il giorno mer 2 ott 2019 alle ore 15:02 <thomas.thi...@telekom.de> ha > scritto: > >> Actually that is what I suppose. >> Or camel - 3.0.0 is buggy. 😉 >> >> -----Ursprüngliche Nachricht----- >> Von: Andrea Cosentino <anco...@gmail.com> >> 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 <thomas.thi...@telekom.de> 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 <claus.ib...@gmail.com> >> > 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 <thomas.thi...@telekom.de> 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 >> > 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(Abstra >> > ctCamelContext.java:565) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.access$000(AbstractC >> > amelContext.java:164) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCame >> > lContext.java:493) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext$2.apply(AbstractCame >> > lContext.java:489) >> > ~[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.AbstractCamelContext.getComponent(Abstrac >> > tCamelContext.java:489) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.getComponent(Abstrac >> > tCamelContext.java:465) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(Abstract >> > CamelContext.java:742) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(Camel >> > ContextHelper.java:55) ~[camel-support-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.DefaultRouteContext.resolveEndpoint(Defau >> > ltRouteContext.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:10 >> > 1) >> > ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.DefaultModel.start(DefaultModel.java:346) >> > ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.DefaultModel.startRoute(DefaultModel.java:320) >> > ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.DefaultModel.startRouteDefinitions(DefaultModel. >> > java:313) >> > ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.DefaultModel.startRouteDefinitions(DefaultModel. >> > java:292) >> > ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.AbstractModelCamelContext.startRouteDefinitions( >> > AbstractModelCamelContext.java:332) >> > ~[camel-core-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(Abstrac >> > tCamelContext.java:2601) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.lambda$doStart$2(Abs >> > tractCamelContext.java:2439) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.doWithDefinedClassLo >> > ader(AbstractCamelContext.java:2456) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCame >> > lContext.java:2437) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBoot >> > CamelContext.java:39) ~[camel-spring-boot-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.j >> > ava:99) >> > ~[camel-api-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelC >> > ontext.java:2346) >> > ~[camel-base-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.ja >> > va:120) ~[camel-spring-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCa >> > melContext.java:156) ~[camel-spring-3.0.0-RC1.jar:3.0.0-RC1] >> > > at >> > org.springframework.context.event.SimpleApplicationEventMulticaster.do >> > InvokeListener(SimpleApplicationEventMulticaster.java:172) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.context.event.SimpleApplicationEventMulticaster.in >> > vokeListener(SimpleApplicationEventMulticaster.java:165) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.context.event.SimpleApplicationEventMulticaster.mu >> > lticastEvent(SimpleApplicationEventMulticaster.java:139) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.context.support.AbstractApplicationContext.publish >> > Event(AbstractApplicationContext.java:402) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.context.support.AbstractApplicationContext.publish >> > Event(AbstractApplicationContext.java:359) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.context.support.AbstractApplicationContext.finishR >> > efresh(AbstractApplicationContext.java:896) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.context.support.AbstractApplicationContext.refresh >> > (AbstractApplicationContext.java:552) >> > ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] >> > > at >> > org.springframework.boot.SpringApplication.refresh(SpringApplication.j >> > ava:743) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE] >> > > at >> > org.springframework.boot.SpringApplication.refreshContext(SpringApplic >> > ation.java:390) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE] >> > > at >> > org.springframework.boot.SpringApplication.run(SpringApplication.java: >> > 312) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE] >> > > at >> > org.springframework.boot.SpringApplication.run(SpringApplication.java: >> > 1214) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE] >> > > at >> > org.springframework.boot.SpringApplication.run(SpringApplication.java: >> > 1203) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE] >> > > at >> > > >> > de.telekom.dms.dpp2.DppMobilWorkflowApplication.main(DppMobilWorkflowA >> > pplication.java:21) ~[classes/:na] Caused by: >> > java.lang.ClassNotFoundException: >> > org.apache.camel.impl.DefaultComponent >> > > at >> > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClas >> > sLoader.java:583) >> > ~[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] >> > > ... 63 common frames omitted >> > > >> > >> > >> > -- >> > Claus Ibsen >> > ----------------- >> > http://davsclaus.com @davsclaus >> > Camel in Action 2: https://www.manning.com/ibsen2 >> > >> >