I have created a java + spring project to run a HumanTask
example on Apache Karaf. To instantiate the class, I use
spring like this
public class HumanTaskExample {
public static void configure() {
RuntimeManager manager =
getRuntimeManager("humantask/HumanTask.bpmn");
...
...
Caused by:
bitronix.tm.resource.ResourceConfigurationException: cannot
create JDBC datasource named jdbc/jbpm-ds
at
bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:80)
at
org.jbpm.osgi.example.JBPMHelper.setupDataSource(JBPMHelper.java:79)
at
org.jbpm.osgi.example.JBPMHelper.startUp(JBPMHelper.java:49)
at
org.jbpm.osgi.example.HumanTaskExample.getRuntimeManager(HumanTaskExample.java:88)
at
org.jbpm.osgi.example.HumanTaskExample.configure(HumanTaskExample.java:28)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.6.0_45]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_45]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_45]
at
java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_45]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546)[91:org.springframework.beans:3.0.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487)[91:org.springframework.beans:3.0.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)[91:org.springframework.beans:3.0.7.RELEASE]
... 14
more
Caused by: java.lang.IllegalArgumentException: resource
with uniqueName 'jdbc/jbpm-ds' has already been registered
at
bitronix.tm.resource.ResourceRegistrar.register(ResourceRegistrar.java:74)
at
bitronix.tm.resource.jdbc.PoolingDataSource.buildXAPool(PoolingDataSource.java:92)
at
bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:76)