camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dimas <Dmitry_Shu...@kaltire.com>
Subject Re: Camel JPA + JTA Transaction (TomEE)
Date Fri, 05 Aug 2016 18:06:46 GMT
Tried that, doesn't work. CDI is starting CamelContext even with
context.setAutoStartup(false). 
 
SEVERE - Failed to create Producer for endpoint:
Endpoint[jpa://com.kaltire.mix.wosess.model.ScanEvent]. Reason:
javax.persistence.PersistenceException: No persistence providers available
for "camel" after trying the following discovered implementations:
org.apache.openjpa.persistence.PersistenceProviderImpl,
org.hibernate.ejb.HibernatePersistence
org.apache.camel.FailedToCreateProducerException: Failed to create Producer
for endpoint: Endpoint[jpa://com.kaltire.mix.wosess.model.ScanEvent].
Reason: javax.persistence.PersistenceException: No persistence providers
available for "camel" after trying the following discovered implementations:
org.apache.openjpa.persistence.PersistenceProviderImpl,
org.hibernate.ejb.HibernatePersistence
	at
org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:444)
	at
org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:160)
	at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:243)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
	at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)
	at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)
	at
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
	at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)
	at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)
	at
org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1372)
	at
org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)
	at
org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
	at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)
	at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)
	at
org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:156)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
	at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)
	at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)
	at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)
	at
org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:1149)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
	at
org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)
	at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)
	at
org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
	at
org.apache.camel.impl.RouteService.startChildService(RouteService.java:340)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:182)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3496)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3426)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3203)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3059)
	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.CamelContext$$OwbNormalScopeProxy0.start(org/apache/camel/CamelContext.java)
	at
org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCamelExtension.java:376)
	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:497)
	at
org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:347)
	at
org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:82)
	at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:312)
	at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:676)
	at
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:485)
	at
org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:480)
	at
org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:719)
	at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:314)
	at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
	at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:193)
	at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:908)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:714)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1254)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1112)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5093)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:644)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:584)
	at
org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:47)
	at org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:180)
	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:497)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
	at
org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35)
	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:497)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
	at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
	at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:100)
	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:497)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:205)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:186)
	at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
	at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:256)
	at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:212)
	at
org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
	at
org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
	at
org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:350)
	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
	at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:104)
	at
org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1102)
	at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:788)
	at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1485)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.persistence.PersistenceException: No persistence providers
available for "camel" after trying the following discovered implementations:
org.apache.openjpa.persistence.PersistenceProviderImpl,
org.hibernate.ejb.HibernatePersistence
	at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:179)
	at
org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:96)
	at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:319)
	at
org.apache.camel.component.jpa.JpaEndpoint.createEntityManagerFactory(JpaEndpoint.java:510)
	at
org.apache.camel.component.jpa.JpaEndpoint.getEntityManagerFactory(JpaEndpoint.java:223)
	at
org.apache.camel.component.jpa.JpaEndpoint.validate(JpaEndpoint.java:503)
	at
org.apache.camel.component.jpa.JpaEndpoint.createProducer(JpaEndpoint.java:145)
	at
org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:439)
	... 131 more
SEVERE - CDI Beans module deployment failed

Is there a way to postpone the Camel Context initialisation be Camel-CDI? 




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JPA-JTA-Transaction-TomEE-tp5785642p5786071.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message