Five Stars

Cannot autocreate component quart2

Hello,

 

I am not able to make work cMessagingEndpoint with quartz2 component in Talend Open Studio for ESB 6.3.1.

 

Tried to use both option in Advanced Settings, but error is same (below). Never had an issue with quartz2 in Talend 5. Ideas?

 

Failed to create route test_cMessagingEndpoint_1: Route(test_cMessagingEndpoint_1)[[From[quartz2:quartz]] -> [... because of Failed to resolve endpoint: quartz2://quartz due to: Cannot auto create component: quartz2
org.apache.camel.FailedToCreateRouteException: Failed to create route test_cMessagingEndpoint_1: Route(test_cMessagingEndpoint_1)[[From[quartz2:quartz]] -> [... because of Failed to resolve endpoint: quartz2://quartz due to: Cannot auto create component: quartz2
 at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:201)
 at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:974)
 at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3301)
 at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3024)
 at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
 at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2854)
 at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2850)
 at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873)
 at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2850)
 at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
 at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2819)
 at org.apache.camel.main.Main.doStart(Main.java:127)
 at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
 at org.apache.camel.main.MainSupport.run(MainSupport.java:138)
 at testing.test_0_1.test.run(test.java:146)
 at testing.test_0_1.test.runJobInTOS(test.java:208)
 at testing.test_0_1.test.main(test.java:178)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz2://quartz due to: Cannot auto create component: quartz2
 at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:588)
 at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
 at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
 at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
 at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
 at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:69)
 at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)
 at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1052)
 at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
 ... 16 more
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: quartz2
 at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:410)
 at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:386)
 at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:558)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.camel.component.quartz2.QuartzComponent': Resolution of declared constructors on bean Class [org.apache.camel.component.quartz2.QuartzComponent] from ClassLoader [sun.misc.Launcher$AppClassLoader@73d16e93] failed; nested exception is java.lang.NoClassDefFoundError: org/quartz/SchedulerException
 at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:157)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1077)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:981)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)
 at org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:39)
 at org.apache.camel.impl.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:87)
 at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:399)
 ... 26 more
Caused by: java.lang.NoClassDefFoundError: org/quartz/SchedulerException
 at java.lang.Class.getDeclaredConstructors0(Native Method)
 at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
 at java.lang.Class.getDeclaredConstructors(Class.java:2020)
 at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:153)
 ... 34 more
Caused by: java.lang.ClassNotFoundException: org.quartz.SchedulerException
 at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 ... 38 more

  • ESB
1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: Cannot autocreate component quart2

1) Menu Help - Install Additional packages 

also - menu Window -> Show View -> modules You manually reinstall jar file for each component to be 100% sure
2) Double check - In preference You point Talend to 1.8 JDK 


I have Talend 6.3.1 and quartz job - it work 

 

 

-----------
6 REPLIES
Seven Stars

Re: Cannot autocreate component quart2

could You attache screenshots of Your route?

are You already add qartz2 component to cMessagingEndpoint?

 

Screen Shot 2017-04-18 at 2.01.28 PM.png

-----------
Five Stars

Re: Cannot autocreate component quart2

My route has only cMessagingEndpoint component with URI "quartz2://myQuartz?cron=0+0/5+12-18+?+*+MON-FRI".

 

I tried to add camel-quartz2 via both "Dependencies" and "Use a custom component" dropbox. In all combinations. It uses camel-quartz2-alldep-2.7.13.jar. Same quartz2 component as Talend v5 where I have no issues.

 

Same issue occurs when using Camel Quartz component.

Seven Stars

Re: Cannot autocreate component quart2

because I can confirm - it is work 

let go as usual from begin:

 

1) do You install  ALL modules? (it easy could - brake on first iteration). You can check it just to confirm - Windows - Modules

2) what version of Java?

3) How many of java installed on machine?

... 

 

-----------
Five Stars

Re: Cannot autocreate component quart2

1) do You install  ALL modules? (it easy could - brake on first iteration). You can check it just to confirm - Windows - Modules

 - not sure how to get there

2) what version of Java?

- JDK 1.8.0_102 64bit

3) How many of java installed on machine?

- also JRE 7, but it is used for Talend 5 only.

 

Other components (jetty, log) work fine.

 

Also camel-quartz2 works in Open Studio for ESB v6.2.0 with same settings.

 

Seven Stars

Re: Cannot autocreate component quart2

1) Menu Help - Install Additional packages 

also - menu Window -> Show View -> modules You manually reinstall jar file for each component to be 100% sure
2) Double check - In preference You point Talend to 1.8 JDK 


I have Talend 6.3.1 and quartz job - it work 

 

 

-----------
Five Stars

Re: Cannot autocreate component quart2

Finally solved the issue - deleted all quartz2 libraries in Talend 6 studio installation and then downloaded it again and it works.

 

Thanks for your help!