Running tests under Java 8

Hey guys,
My BPMN tests are running well under the Java 7 and from the Maven. But we are migrating to Java 8 and I all tests stops working for me under the such conditions with the error below:
org.camunda.bpm.engine.ProcessEngineException: Error while building ibatis SqlSessionFactory: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: Oracle Java Technologies | Oracle with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: jar:file:/C:/Users/Yevgeny%20Barkovsky/.m2/repository/net/sf/saxon/Saxon-HE/9.4/Saxon-HE-9.4.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:1085)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:686)
at org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration.init(ProcessCoverageInMemProcessEngineConfiguration.java:32)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:649)
at org.camunda.bpm.engine.impl.test.TestHelper.getProcessEngine(TestHelper.java:521)
at org.camunda.bpm.engine.test.ProcessEngineRule.initializeProcessEngine(ProcessEngineRule.java:172)
at org.camunda.bpm.engine.test.ProcessEngineRule.apply(ProcessEngineRule.java:154)
at org.camunda.bpm.extension.process_test_coverage.junit.rules.TestCoverageProcessEngineRule.apply(TestCoverageProcessEngineRule.java:363)
at org.junit.rules.RunRules.applyAll(RunRules.java:26)
at org.junit.rules.RunRules.(RunRules.java:15)
at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:245)
at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:194)
at org.junit.runners.ParentRunner.run(ParentRunner.java:362)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: Oracle Java Technologies | Oracle with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: jar:file:/C:/Users/Yevgeny%20Barkovsky/.m2/repository/net/sf/saxon/Saxon-HE/9.4/Saxon-HE-9.4.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102)
at org.apache.ibatis.parsing.XPathParser.commonConstructor(XPathParser.java:264)
at org.apache.ibatis.parsing.XPathParser.(XPathParser.java:119)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.(XMLConfigBuilder.java:63)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:1070)
… 24 more
Could someone help me please?

1 Like

Hi @Eugene_Barkovsky,

it seems to be the bug in Saxon library:

So, what do we do to deal with this error in java 8? That would be more helpful to know