Description
Any piece of code using xstream will fail on java 17+ without some dedicated jvm options.
While those options have been defined in the context of servlet execution, this is not the case everywhere (for instance, building xwiki-rendering-syntax-xhtml with java 17 will fail)
[ERROR] org.xwiki.rendering.test.cts.RenderingTest Time elapsed: 0.008 s <<< ERROR! org.xwiki.rendering.parser.ParseException: Failed to parse input source at org.xwiki.rendering.xml.internal.parser.AbstractStreamParser.parse(AbstractStreamParser.java:103) at org.xwiki.rendering.test.cts.AbstractRenderingTest.convert(AbstractRenderingTest.java:307) at org.xwiki.rendering.test.cts.AbstractRenderingTest.convert(AbstractRenderingTest.java:290) at org.xwiki.rendering.test.cts.AbstractRenderingTest.executeTest(AbstractRenderingTest.java:207) at org.xwiki.rendering.test.cts.AbstractRenderingTest.executeOutputTest(AbstractRenderingTest.java:169) at org.xwiki.rendering.test.cts.AbstractRenderingTest.execute(AbstractRenderingTest.java:120) at org.xwiki.rendering.test.cts.RenderingTest.execute(RenderingTest.java:52) at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) 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.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.xwiki.rendering.test.cts.RenderingTestClassRunner.runChild(RenderingTestClassRunner.java:143) at org.xwiki.rendering.test.cts.RenderingTestClassRunner.runChild(RenderingTestClassRunner.java:43) 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.run(ParentRunner.java:413) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) 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:42) at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80) at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:72) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:50) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) Caused by: com.thoughtworks.xstream.converters.ConversionException: No converter available ---- Debugging information ---- message : No converter available type : java.util.Collections$EmptyList converter : com.thoughtworks.xstream.converters.reflection.ReflectionConverter message[1] : Unable to make field protected transient int java.util.AbstractList.modCount accessible: module java.base does not "opens java.util" to unnamed module @43c3d622 class : org.xwiki.rendering.syntax.SyntaxType required-type : org.xwiki.rendering.syntax.SyntaxType converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter class[1] : org.xwiki.rendering.syntax.Syntax required-type[1] : org.xwiki.rendering.syntax.Syntax class[2] : java.util.LinkedHashMap required-type[2] : java.util.LinkedHashMap converter-type[1] : org.xwiki.filter.xml.internal.parameter.MapConverter class[3] : org.xwiki.rendering.listener.MetaData required-type[3] : org.xwiki.rendering.listener.MetaData version : 15.3-SNAPSHOT ------------------------------- at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:88) at com.thoughtworks.xstream.XStream$1.lookupConverterForType(XStream.java:485) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:56) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readBareItem(AbstractCollectionConverter.java:132) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:117) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readCompleteItem(AbstractCollectionConverter.java:147) at com.thoughtworks.xstream.converters.collections.MapConverter.putCurrentEntryIntoMap(MapConverter.java:106) at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:98) at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:92) at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:87) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:499) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:425) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:277) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at org.xwiki.filter.xml.internal.parameter.XMLTreeUnmarshaller.start(XMLTreeUnmarshaller.java:61) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at org.xwiki.filter.xml.internal.parameter.NoWarningXStream.unmarshal(NoWarningXStream.java:66) at org.xwiki.filter.xml.internal.parameter.XStreamParameterManager.unSerialize(XStreamParameterManager.java:127) at org.xwiki.filter.xml.internal.parser.DefaultXMLParser.unserializeParameter(DefaultXMLParser.java:372) at org.xwiki.filter.xml.internal.parser.DefaultXMLParser.setParameter(DefaultXMLParser.java:337) at org.xwiki.filter.xml.internal.parser.DefaultXMLParser.setParameter(DefaultXMLParser.java:319) at org.xwiki.filter.xml.internal.parser.DefaultXMLParser.endElement(DefaultXMLParser.java:469) at org.xwiki.rendering.xdomxmlcurrent.internal.parser.XDOMXMLContentHandlerStreamParser.endElement(XDOMXMLContentHandlerStreamParser.java:82) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.xwiki.rendering.xml.internal.parser.AbstractStreamParser.parseXML(AbstractStreamParser.java:126) at org.xwiki.rendering.xml.internal.parser.AbstractStreamParser.parse(AbstractStreamParser.java:101) ... 56 more
Attachments
Issue Links
- causes
-
XCOMMONS-2853 Fix DefaultJobStatusStoreTest which fails to build on Java 17
- Closed
-
XWIKI-21144 ExtensionManagerScriptServiceTest is failing when built with Java 17
- Closed
- is duplicated by
-
XWIKI-19034 NPE in console when restarting XWiki after installing an extension on JAVA 17, Jetty
- Reopened
- is related to
-
XWIKI-20836 Make XWiki execute fine on Java 17 with the standalone distribution on Windows
- Closed
-
XWIKI-19078 Make XWiki execute fine on Java 17 with the standalone distribution on linux
- Closed
- relates to
-
XRENDERING-616 Cannot save a page which contains a link with the WYSIWYG on JAVA 17, Jetty
- Closed
-
XCOMMONS-2776 Move to Java 17 as minimum version
- Closed