繁体   English   中英

将wsdl转换为JAR文件时出现错误

[英]Getting Error while conversion of wsdl to JAR file

我需要将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文件,但其中不包含任何包组件或类。 您能解释一下这种错误是什么吗? 请尽快回复。 提前致谢。

由于命令没有问题。 您是否使用jdk 1.6进行了尝试,它对我有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM