Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/330.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java中AS7(和JBPM 6.2)中使用的正确事务管理器是什么?_Java_Mysql_Jbpm_Bitronix - Fatal编程技术网

Java中AS7(和JBPM 6.2)中使用的正确事务管理器是什么?

Java中AS7(和JBPM 6.2)中使用的正确事务管理器是什么?,java,mysql,jbpm,bitronix,Java,Mysql,Jbpm,Bitronix,我希望有人能在我花几个小时试图弄明白之前回答这个问题 我正在使用PoolgDataSource类来实例化我的事务管理器。然而,我在这方面没有太大的成功 MySQL是我的默认数据库。我正在使用: PoolingDataSource ds = new PoolingDataSource(); ds.setUniqueName("java:jboss/datasources/jbpmDS"); ds.setClassName("bitronix.tm.resource.jdbc.lr

我希望有人能在我花几个小时试图弄明白之前回答这个问题

我正在使用PoolgDataSource类来实例化我的事务管理器。然而,我在这方面没有太大的成功

MySQL是我的默认数据库。我正在使用:

 PoolingDataSource ds = new PoolingDataSource();

   ds.setUniqueName("java:jboss/datasources/jbpmDS");
   ds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
  ds.setMaxPoolSize(3);
  ds.setAllowLocalTransactions(true);
  ds.getDriverProperties().put("user", "root");
  ds.getDriverProperties().put("password", "rootpass");
  ds.getDriverProperties().put("URL", "jdbc:mysql://localhost:3306/jbpm6");
  ds.getDriverProperties().put("driverClassName", "com.mysql.Driver");

  ds.init();
我在运行代码时得到以下信息:

bitronix.tm.resource.ResourceConfigurationException:无法创建名为java:jboss/datasources/jbpmDS的JDBC数据源
位于bitronix.tm.resource.jdbc.poolgDataSource.init(poolgDataSource.java:92)
在com.sample.ProcessTest.testProcess(ProcessTest.java:67)上
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)中
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)中
位于java.lang.reflect.Method.invoke(Method.java:606)
位于org.junit.runners.model.FrameworkMethod$1.runReflectVeCall(FrameworkMethod.java:47)
位于org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
位于org.junit.runners.model.FrameworkMethod.invokeeexplosive(FrameworkMethod.java:44)
位于org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
位于org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
位于org.junit.internal.runners.statements.runafter.evaluate(runafter.java:27)
位于org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
位于org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
位于org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
位于org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
位于org.junit@runners.ParentRunner$1.schedule(ParentRunner.java:63)
位于org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
访问org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
位于org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
位于org.junit.runners.ParentRunner.run(ParentRunner.java:309)
位于org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
位于org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
位于org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
位于org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
位于org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
位于org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
原因:bitronix.tm.utils.PropertyException:类“bitronix.tm.resource.jdbc.lrc.LrcXADataSource”中没有可写属性“URL”
在bitronix.tm.utils.PropertyUtils.getSetter(PropertyUtils.java:318)
位于bitronix.tm.utils.PropertyUtils.setDirectProperty(PropertyUtils.java:217)
位于bitronix.tm.utils.PropertyUtils.setProperty(PropertyUtils.java:83)
位于bitronix.tm.resource.common.XAPool.createXAFactory(XAPool.java:304)
位于bitronix.tm.resource.common.XAPool.(XAPool.java:63)
位于bitronix.tm.resource.jdbc.poolgDataSource.buildXAPool(poolgDataSource.java:101)
位于bitronix.tm.resource.jdbc.poolgDataSource.init(poolgDataSource.java:88)
... 26多

原因:bitronix.tm.utils.PropertyException:无可写属性 “URL”

这是因为正确的属性名称是“url”(小写)

bitronix.tm.resource.ResourceConfigurationException: cannot create JDBC datasource named java:jboss/datasources/jbpmDS
  at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:92)
  at com.sample.ProcessTest.testProcess(ProcessTest.java:67)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
  at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  at org.junit.@runners.ParentRunner$1.schedule(ParentRunner.java:63)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
  at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
  at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: bitronix.tm.utils.PropertyException: no writeable property 'URL' in class 'bitronix.tm.resource.jdbc.lrc.LrcXADataSource'
  at bitronix.tm.utils.PropertyUtils.getSetter(PropertyUtils.java:318)
  at bitronix.tm.utils.PropertyUtils.setDirectProperty(PropertyUtils.java:217)
  at bitronix.tm.utils.PropertyUtils.setProperty(PropertyUtils.java:83)
  at bitronix.tm.resource.common.XAPool.createXAFactory(XAPool.java:304)
  at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:63)
  at bitronix.tm.resource.jdbc.PoolingDataSource.buildXAPool(PoolingDataSource.java:101)
  at bitronix.tm.r esource.jdbc.PoolingDataSource.init(PoolingDataSource.java:88)
  ... 26 more