[ https://issues.apache.org/jira/browse/CXFXJC-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colm O hEigeartaigh reassigned CXFXJC-42: ----------------------------------------- Assignee: Colm O hEigeartaigh > cxf-xjc-plugin fails with Java 17.0.3 on Windows due to outdated xjc > dependency > ------------------------------------------------------------------------------- > > Key: CXFXJC-42 > URL: https://issues.apache.org/jira/browse/CXFXJC-42 > Project: CXF XJC Utils > Issue Type: Bug > Components: Maven Plugin > Affects Versions: 3.3.1 > Environment: Windows 10 > Java 17.0.3 (Bellsoft Liberica) > Reporter: Falko Modler > Assignee: Colm O hEigeartaigh > Priority: Major > > Latest 3.3.1 of the plugin started to fail on Windows (not on Linux!) after > updating from Java 17.0.2 to 17.0.3: > {noformat} > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 2.772 s (Wall Clock) > [INFO] Finished at: 2022-04-26T17:28:54+02:00 > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal org.apache.cxf:cxf-xjc-plugin:3.3.1:xsdtojava > (xjc) on project register-something: > [ERROR] Exit code: 1 > [ERROR] Command line was: > C:\Users\foo\.sdkman\candidates\java\17.0.3-librca\bin\java.exe > --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED > --add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED > --add-opens java.base/java.security=ALL-UNNAMED --add-opens > java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED > --add-opens java.base/java.util=ALL-UNNAMED --add-opens > java.base/java.util.concurrent=ALL-UNNAMED -jar > C:\Develop\Temp\cxf-xjc-plugin11678367863192748736.jar -classpath > file:/C:/Users/foo/.m2/repository/org/jvnet/jaxb2_commons/jaxb2-basics-tools/0.12.0/jaxb2-basics-tools-0.12.0.jar > -classpath > file:/C:/Users/foo/.m2/repository/org/jvnet/annox/annox/1.0.2/annox-1.0.2.jar > -classpath > file:/C:/Users/foo/.m2/repository/org/apache/commons/commons-lang3/3.2.1/commons-lang3-3.2.1.jar > -classpath > file:/C:/Users/foo/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar > -classpath > file:/C:/Users/foo/.m2/repository/commons-io/commons-io/1.2/commons-io-1.2.jar > -classpath > file:/C:/Users/foo/.m2/repository/org/jvnet/jaxb2_commons/jaxb2-basics-annotate/1.1.0/jaxb2-basics-annotate-1.1.0.jar > -classpath > file:/C:/Users/foo/.m2/repository/com/google/code/javaparser/javaparser/1.0.11/javaparser-1.0.11.jar > -classpath > file:/C:/Users/foo/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar > -classpath > file:/C:/Users/foo/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar > -b > file:/C:/Develop/project/dev2/register.git/something/src/main/resources/webservice/xjc-bindings.xjb > -extension -Xannotate -encoding UTF-8 -d > C:\Develop\project\dev2\register.git\something\target/generated-sources/xsd/ > file:/C:/Develop/project/dev2/register.git/something/src/main/resources/webservice/xml-data-1.0.xsd > [ERROR] > {noformat} > {{mvn -X}} reveals: > {noformat} > [DEBUG] Exception in thread "main" com.sun.tools.xjc.BadCommandLineException: > "file:\C:\Users\foo\.m2\repository\org\jvnet\jaxb2_commons\jaxb2-basics-tools\0.12.0\jaxb2-basics-tools-0.12.0.jar" > ist kein gültiger Dateiname: {1} > [DEBUG] at com.sun.tools.xjc.Options.parseArgument(Options.java:515) > [DEBUG] at com.sun.tools.xjc.Options.parseArguments(Options.java:827) > [DEBUG] at > org.apache.cxf.maven_plugin.XSDToJavaRunner.run(XSDToJavaRunner.java:170) > [DEBUG] at > org.apache.cxf.maven_plugin.XSDToJavaRunner.main(XSDToJavaRunner.java:360) > [DEBUG] Caused by: java.net.MalformedURLException: Invalid file path > [DEBUG] at java.base/java.io.File.toURL(File.java:695) > [DEBUG] at com.sun.tools.xjc.Options.parseArgument(Options.java:512) > {noformat} > ("ist kein gültiger Dateiname:" is something like "is not a valid file name") > This config is triggering the issue: > {code:xml} > <configuration> > <extensions> > > <extension>org.jvnet.jaxb2_commons:jaxb2-basics-annotate:${jaxb2-basics-annotate.version}</extension> > </extensions> > </configuration> > {code} > Turns out that updating {{jaxb-xjc}} and {{jaxb-runtime}} dependencies of the > plugin to 2.3.3 or newer fixes the issue (2.3.6 is latest 2.3.x). > Ironically, that update was done already a year ago via > https://github.com/apache/cxf-xjc-utils/commit/5d8724057f1298816573ab59f2100356a7d669d0#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R49 > but there hasn't been a release since then. > PS: Latest {{cxf-codegen-plugin}} 3.5.2 is using 2.3.5 of {{jaxb-runtime}}. -- This message was sent by Atlassian Jira (v8.20.7#820007)