Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-747

JDK9 on drools/optaplanner/jbpm: PersistenceUtil should be compatible with JDK 9

XMLWordPrintable

    • NEW
    • NEW

      PersistenceUtil is a community class written by QA to make it easier to setup QA tests against the QA database matrix. It doesn't work well on JDK 9 as shown by this jenkins job:
      https://kie-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/JDK9/job/optaplanner-jdk9/lastCompletedBuild/testReport/org.optaplanner.persistence.jpa.impl.score.buildin.bendable/BendableScoreHibernateTypeTest/persistAndMerge/

      Here's the stacktrace from a failing test:

      Caused by: java.lang.IllegalArgumentException: resource with uniqueName 'jdbc/testDS1' has already been registered
      	at bitronix.tm.resource.ResourceRegistrar.register(ResourceRegistrar.java:83)
      	at bitronix.tm.resource.jdbc.PoolingDataSource.buildXAPool(PoolingDataSource.java:104)
      	at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:88)
      	at org.kie.test.util.db.PersistenceUtil.setupWithPoolingDataSource(PersistenceUtil.java:93)
      	at org.kie.test.util.db.PersistenceUtil.setupWithPoolingDataSource(PersistenceUtil.java:70)
      	at org.kie.test.util.db.PersistenceUtil.setupWithPoolingDataSource(PersistenceUtil.java:61)
      	at org.optaplanner.persistence.jpa.impl.score.AbstractScoreHibernateTypeTest.setUp(AbstractScoreHibernateTypeTest.java:49)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:537)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      

      I probably affects both optaplanner-persistence, drools-persistence and jbpm-persistence tests.

      Can you guys take a look?

              psiroky_jira Petr Široký (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: