Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7517

Codegen fails when using JDK9 with maven and cxf-plugin

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.12
    • Fix Version/s: 3.2.1
    • Component/s: Tooling
    • Labels:
    • Estimated Complexity:
      Unknown

      Description

      I get this stack trace when trying to generate code with the cxf-codegen-plugin:

      [INFO] --- cxf-codegen-plugin:3.1.12:wsdl2java (default) @ jfr-srv-schemas ---
      [INFO] Using proxy server configured in maven.
      [INFO] Running code generation in fork mode...
      [INFO] The java executable is /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/java
      [INFO] Building jar: /var/folders/c7/18m1hlzs075_z0f5nfnt44jm0000gn/T/cxf-tmp-3400635706757982781/cxf-codegen16491176446297681426.jar
      [WARNING] WARNING: An illegal reflective access operation has occurred
      [WARNING] WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/Users/et2448/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
      [WARNING] WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
      [WARNING] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
      [WARNING] WARNING: All illegal access operations will be denied in a future release
      [WARNING] Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/ws/Service
      [WARNING]       at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.isJaxws22(JAXWSContainer.java:64)
      [WARNING]       at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.getServiceTarget(JAXWSContainer.java:61)
      [WARNING]       at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSContainer.java:68)
      [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:175)
      [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
      [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:415)
      [WARNING]       at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
      [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
      [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
      [WARNING]       at org.apache.cxf.maven_plugin.wsdl2java.ForkOnceWSDL2Java.main(ForkOnceWSDL2Java.java:51)
      [WARNING] Caused by: java.lang.ClassNotFoundException: javax.xml.ws.Service
      [WARNING]       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
      [WARNING]       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
      [WARNING]       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
      [WARNING]       ... 10 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ffang Freeman Fang
                Reporter:
                davidkarlsen David J. M. Karlsen
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: