我需要将 wsdl 文件转换为 JAR 文件。我正在从命令提示符处转换它。我正在使用以下命令进行转换。
java –classpath pathToJAR/wsc-22.jar com.sforce.ws.tools.wsdlc pathToWsdl/WsdlFilename pathToOutputJar/OutputJarFilename
但是在使用上述命令后,我得到以下错误堆栈:
C:\Users>java -classpath "D:\Pravin\Project Related\wsc-23.jar" com.sforce.ws.tools.wsdlc "D:\Pravin\Project Related\Enterprise.wsdl" "D:\Generated JAR\enterprise11.jar"
[WSC23][wsdlc.run:348]Created temp dir: C:\Users\PRAVIN~1.HCL\AppData\Local\Temp\wsdlc-temp-2668333477894471816-dir
[WSC23][wsdlc.<init>:110]Generating Java files from schema ...
[WSC23][wsdlc.<init>:110]Generated 366 java files.
[WSC23][wsdlc.compileTypes:298]Compiling to target default...
An exception has occurred in the compiler (1.7.0-ea). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include
your program and the following diagnostic in your report. Thank you.
java.lang.NoSuchFieldError: RESOURCE_VARIABLE
at com.sun.tools.javac.code.Symbol$VarSymbol.getConstValue(Symbol.java:1002)
at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:782)
at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:716)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:409)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:396)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:458)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:3077)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3000)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2936)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1122)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:842)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:801)
at com.sun.tools.javac.main.Main.compile(Main.java:409)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:139)
at com.sforce.ws.tools.wsdlc$Compiler.compile(wsdlc.java:491)
at com.sforce.ws.tools.wsdlc.compileTypes(wsdlc.java:298)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:119)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:348)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:339)
[WSC23][wsdlc.compileTypes:298]Compiled 369 java files.
[WSC23][wsdlc.<init>:120]Generating jar file ... D:\Generated JAR\enterprise11.jar
Exception in thread "main" java.io.FileNotFoundException: C:\Users\PRAVIN~1.HCL\AppData\Local\Temp\wsdlc-temp-2668333477894471816-dir\com\sforce\soap\enterprise\fault\ApiFault.class (The system cannot
find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sforce.ws.tools.wsdlc.addFileToJar(wsdlc.java:244)
at com.sforce.ws.tools.wsdlc.generateJarFile(wsdlc.java:223)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:120)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:348)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:339)
已创建 JAR 文件,但它不包含任何包组件或类。你能解释一下这个错误是什么类型的吗?请尽快回复。提前致谢。