1 Reply Latest reply on Apr 19, 2016 10:34 AM by Gopi Uppala

    wsconsume issues with wildfly 10

    Gopi Uppala Newbie

      I am trying to compile a WSDL file with WSCONSUME tool. First I tried with JDK 1.8 since wildfly 10 requires that version and seeing the following error

       

      C:\Users\gu8372>set JAVA_HOME=C:\JDK1.8_77

      C:\Users\gu8372>set JBOSS_HOME=C:\WildFly\wildfly-10.0.0.Final

      C:\Users\gu8372>set path=%JAVA_HOME%/bin;%JBOSS_HOME%/bin

      C:\WildFlyEvaluation\InBand>wsconsume -k InBand.wsdl

      Could not find log4j.xml configuration, logging to console.

       

      Loading FrontEnd jaxws ...

      Loading DataBinding jaxb ...

      wsdl2java -compile -exsh false -d C:\WildFlyEvaluation\InBand\output -verbose -classdir C:\WildFlyEvaluation\InBand\output -allowElementReferences file:/C:/WildFlyEvaluation/InBand/InBand.wsdl

      wsdl2java - Apache CXF 3.1.4

       

      JBWS024002: Failed to invoke org.apache.cxf.tools.wsdlto.WSDLToJava

      org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException

              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon

      tainer.java:423)

              at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja

      va:103)

              at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)

              at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl

      .java:313)

              at org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:298)

              at org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:108)

              at org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:96)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              at org.jboss.modules.Module.run(Module.java:329)

              at org.jboss.modules.Main.main(Main.java:507)

      Caused by: java.lang.NullPointerException

              at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:18

      7)

              at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)

              at org.apache.cxf.tools.common.ClassUtils.compile(ClassUtils.java:122)

              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJav

      aContainer.java:306)

              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon

       

      This Apache CXF release notes mentioned that it requires Java 1.7 Apache CXF -- CXF 3.1.6 Release Notes

       

      Here is the error with JAVA_HOME set to JDK 1.7 (kind of expected this)

      C:\WildFlyEvaluation\InBand>wsconsume -k InBand.wsdl

      Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jboss/modules/Main : Unsupported major.minor version 52.0

              at java.lang.ClassLoader.defineClass1(Native Method)

              at java.lang.ClassLoader.defineClass(ClassLoader.java:791)

              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14

      2)

              at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

              at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

              at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

              at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

              at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480)

       

      Please let me know how to resolve this error.