camel spring xml jpa transaction route not starting in standalone mode

113 views Asked by At

I tried to apply jpa transaction manager with spring transaction policy to one route. As a result, it is starting and thrown below issue. could you please let me know the cause of the issue and solution.Could you please share any quick-starts of camel jpa transaction for standalone mode. I can find quick-starts for fuse and server mode.

[pache.camel.spring.Main.main()] DefaultTypeConverter           INFO  Loaded 240 type converters
[pache.camel.spring.Main.main()] DefaultRuntimeEndpointRegistry INFO  Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
[pache.camel.spring.Main.main()] JpaComponent                   INFO  Using EntityManagerFactory configured: org.springframework.orm.jpa.LocalEntityManagerFactoryBean@147d849
[pache.camel.spring.Main.main()] JpaComponent                   INFO  Using TransactionManager configured on this component: org.springframework.orm.jpa.JpaTransactionManager@a9b98d
[ERROR] *************************************
[ERROR] Error occurred while running main from: org.apache.camel.spring.Main
[ERROR] 
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:458)
 at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: org.apache.camel.processor.RedeliveryErrorHandler.<init>(Lorg/apache/camel/CamelContext;Lorg/apache/camel/Processor;Lorg/apache/camel/util/CamelLogger;Lorg/apache/camel/Processor;Lorg/apache/camel/processor/RedeliveryPolicy;Lorg/apache/camel/Processor;Ljava/lang/String;ZZLorg/apache/camel/Predicate;Ljava/util/concurrent/ScheduledExecutorService;Lorg/apache/camel/Processor;)V
 at org.apache.camel.spring.spi.TransactionErrorHandler.<init>(TransactionErrorHandler.java:70)
 at org.apache.camel.spring.spi.TransactionErrorHandlerBuilder.createErrorHandler(TransactionErrorHandlerBuilder.java:110)
 at org.apache.camel.spring.spi.SpringTransactionPolicy.createTransactionErrorHandler(SpringTransactionPolicy.java:124)
 at org.apache.camel.spring.spi.SpringTransactionPolicy.wrap(SpringTransactionPolicy.java:108)
 at org.apache.camel.model.TransactedDefinition.createProcessor(TransactedDefinition.java:162)
 at org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:534)
 at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:495)
 at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:219)
 at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1069)
 at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
 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.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:270)
 at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
 at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
 at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
 at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
 at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
 at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
 at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
 at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:205)
 at org.apache.camel.spring.Main.doStart(Main.java:154)
 at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
 at org.apache.camel.main.MainSupport.run(MainSupport.java:138)
 at org.apache.camel.main.MainSupport.run(MainSupport.java:390)
 at org.apache.camel.spring.Main.main(Main.java:87)
 ... 6 more
[ERROR] *************************************
[WARNING] thread Thread[Timer-0,5,org.apache.camel.spring.Main] was interrupted but is still alive after waiting at least 15000msecs
[WARNING] thread Thread[Timer-0,5,org.apache.camel.spring.Main] will linger despite being asked to die via interruption
[WARNING] thread Thread[derby.rawStoreDaemon,5,derby.daemons] will linger despite being asked to die via interruption
[WARNING] NOTE: 2 thread(s) did not finish despite being asked to  via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
[WARNING] Couldn't destroy threadgroup org.apache.camel.maven.RunMojo$IsolatedThreadGroup[name=org.apache.camel.spring.Main,maxpri=10]
java.lang.IllegalThreadStateException
 at java.lang.ThreadGroup.destroy(ThreadGroup.java:778)
 at org.apache.camel.maven.RunMojo.execute(RunMojo.java:491)
 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------

0

There are 0 answers