Looks like data source is created twice. Do you have any other place that bootstraps data source via bitronix?
Maciej
W dniu 29.05.2013 07:23, Charles Moulliard pisze:
Hi,
I have created a java + spring project to run a HumanTask example on Apache Karaf. To instantiate the class, I use spring like this
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="humanTaskExample" class="org.jbpm.osgi.example.HumanTaskExample"
init-method="configure"/>
</beans>
public class HumanTaskExample {
public static void configure() {
RuntimeManager manager = getRuntimeManager("humantask/HumanTask.bpmn");
...
private static RuntimeManager getRuntimeManager(String process) {// load up the knowledge baseJBPMHelper.startUp();
...
The JBPMHelper class used corresponds to : https://github.com/droolsjbpm/jbpm/blob/master/jbpm-test/src/main/java/org/jbpm/test/JBPMHelper.java
But when spring creates the dataSource, I get this error :
Caused by: bitronix.tm.resource.ResourceConfigurationException: cannot create JDBC datasource named jdbc/jbpm-dsat 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 moreCaused by: java.lang.IllegalArgumentException: resource with uniqueName 'jdbc/jbpm-ds' has already been registeredat 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)
Any idea is welcome
Regards,
--
Charles MoulliardApache Committer / Sr. Enterprise Architect (RedHat)Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
_______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev