Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-2136

Failure to run tests in xwiki-commons-extension-repository-xwiki with Java 14

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ xwiki-commons-extension-repository-xwiki ---
      [INFO] 
      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      [INFO] Running org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepositoryTest
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.727 s - in org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepositoryTest
      [INFO] Running org.xwiki.extension.repository.xwiki.internal.SystemHTTPProxyTest
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.665 s <<< FAILURE! - in org.xwiki.extension.repository.xwiki.internal.SystemHTTPProxyTest
      [ERROR] testProxy  Time elapsed: 0.664 s  <<< ERROR!
      org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepositoryFactory] identified by type [interface org.xwiki.extension.repository.ExtensionRepositoryFactory] and hint [xwiki]
      	at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
      	at org.xwiki.test.mockito.MockitoComponentMockingRule.getComponentUnderTest(MockitoComponentMockingRule.java:243)
      	at org.xwiki.extension.repository.xwiki.internal.SystemHTTPProxyTest.testProxy(SystemHTTPProxyTest.java:56)
      	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:564)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.xwiki.test.mockito.MockitoComponentMockingRule$1.evaluate(MockitoComponentMockingRule.java:188)
      	at com.github.tomakehurst.wiremock.junit.WireMockRule$1.evaluate(WireMockRule.java:62)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
      	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
      	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
      	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      Caused by: org.xwiki.component.phase.InitializationException: Failed to create JAXB context
      	at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepositoryFactory.initialize(XWikiExtensionRepositoryFactory.java:67)
      	at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
      	at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
      	at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
      	at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
      	... 52 more
      Caused by: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
       - with linked exception:
      [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
      	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131)
      	at javax.xml.bind.ContextFinder.find(ContextFinder.java:318)
      	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:478)
      	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:435)
      	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:336)
      	at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepositoryFactory.initialize(XWikiExtensionRepositoryFactory.java:65)
      	... 56 more
      Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      	at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:92)
      	at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:125)
      	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:128)
      	... 61 more
      
      [INFO] 
      [INFO] Results:
      [INFO] 
      [ERROR] Errors: 
      [ERROR]   SystemHTTPProxyTest.testProxy:56 ยป ComponentLookup Failed to lookup component ...
      [INFO] 
      [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
      

      The issue is that JAXB has been removed by default, see https://www.jesperdj.com/2018/09/30/jaxb-on-java-9-10-11-and-beyond/

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: