cancel
Showing results for 
Search instead for 
Did you mean: 

HELP: Activiti on Apache Karaf

deepyou
Champ in-the-making
Champ in-the-making
Hi all, We're following the example showed in the "Activiti in Action" Book ( 9.3.2 Using Apache Karaf as an OSGi container) to upload activiti-egine as Bundle in OSGi containter (apache Karaf). We already know that there is a project "Activiti-Karaf" that is a bundle with activiti engine and karaf.
But we need to learn how to deploy activiti-engine as bundle in our OSGi container so we need to upload Activiti as Bundle.
We tried to follow the example in the Book written by Tijs Rademakers but we have a lot of problems. It seem that the karaf container cannot connect to the activiti H2 DataBase (we suppose).

Can someone indicate a step by step tutorial to deploy activiti-engine in OSGi containter? I think that Activiti-doc in this case is not so rich.

I post the exception that we have after we try to deploy the activiti-engine bundle and try to start it on Apache Karaf.

Can someone help Us?

Best Regards
Gaetano.

g.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-1']
   … 63 more
2012-10-29 16:53:04,964 | ERROR | rint Extender: 2 | ServiceRecipe                    | lueprint.container.ServiceRecipe  323 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-1']
org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean processEngineFactory
   at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.ServiceRecipe.getService(ServiceRecipe.java:349)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:502)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:308)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:219)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:310)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.Felix.getService(Felix.java:3420)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:468)[org.apache.felix.framework-4.0.3.jar:]
   at org.activiti.osgi.Extender.addingService(Extender.java:89)[76:org.activiti.osgi:5.10.0]
   at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)[karaf.jar:2.3.0]
   at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)[karaf.jar:2.3.0]
   at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf.jar:2.3.0]
   at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[karaf.jar:2.3.0]
   at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894)[karaf.jar:2.3.0]
   at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.Felix.registerService(Felix.java:3275)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)[org.apache.felix.framework-4.0.3.jar:]
   at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:421)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:191)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_35]
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_35]
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_35]
   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_35]
   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_35]
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_35]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_35]
   at java.lang.Thread.run(Thread.java:662)[:1.6.0_35]
Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean processEngineFactory
   at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_35]
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_35]
   at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_35]
   at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_35]
   at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
   … 34 more
Caused by: org.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:575)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:325)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:300)
   at org.activiti.osgi.blueprint.ProcessEngineFactory.init(ProcessEngineFactory.java:46)
   at org.activiti.osgi.blueprint.ProcessEngineFactoryWithELResolver.init(ProcessEngineFactoryWithELResolver.java:39)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_35]
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_35]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_35]
   at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_35]
   at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.0.1]
   at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.0.1]
   … 52 more
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
   at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.1.0]
   at org.apache.ibatis.parsing.XPathParser.commonConstructor(XPathParser.java:261)
   at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:116)
   at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:59)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:566)
   … 63 more
10 REPLIES 10

deepyou
Champ in-the-making
Champ in-the-making
Hi Tijs,
Solved, the problem was the version of Apache Karaf, the example showed in the book "Activiti in Action" works with version 2.2.9 of Apache Karaf.
Thank you for your support, Thank you for your wondeful Book, Thanks to Activiti Developer Community.

Now our next step is deploy Activiti Engine and Activiti processes in our OSGi container.
Thanks again, at every step Activiti-Engine seems fit our needs for our technologies.
Best Regards.
Gaetano