首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将wsdl转换为JAR文件时出现错误

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

Stack Overflow用户
提问于 2013-09-26 14:23:58
回答 1查看 1.2K关注 0票数 1

我需要从命令提示符将wsdl文件转换为JAR文件。我使用以下命令进行转换。

代码语言:javascript
复制
java –classpath pathToJAR/wsc-22.jar com.sforce.ws.tools.wsdlc pathToWsdl/WsdlFilename pathToOutputJar/OutputJarFilename

但在使用上面的命令后,我得到了以下错误堆栈:

代码语言:javascript
复制
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文件,但它不包含任何包组件或类。你能给我解释一下这是哪种错误吗?请尽快回复。提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2013-10-25 12:13:04

因为命令没有问题。你有没有在jdk 1.6上尝试过,它对我来说很有效。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19020818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档