简体   繁体   English

调用 com.sun.tools.ws.wscompile.WsimportTool 失败

[英]Invocation of com.sun.tools.ws.wscompile.WsimportTool failed

I am getting following exception while hitting wsconsume in maven build:在 maven 构建中点击 wsconsume 时出现以下异常:

Some problems were encountered while building the effective model for MyProject:jar:1.0-SNAPSHOT 'build.plugins.plugin.version' for org.codehaus.mojo:jaxws-maven-plugin is missing. @ line 40, column 14

Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.4.1:wsimport (MyAPI) on project MyProject:Invocation of com.sun.tools.ws.wscompile.WsimportTool failed

RELATED POM:相关POM:

                        <execution>
                            <id>MyAPI</id>
                            <goals>
                                <goal>wsimport</goal>
                            </goals>
                            <configuration>
                                <bindingDirectory>${basedir}/src/main/resources</bindingDirectory>
                                <sourceDestDir>${basedir}/src/main/java</sourceDestDir>
                                <bindingFiles>
                                    <bindingFile>myprod.jaxb</bindingFile>
                                </bindingFiles>
                                <xadditionalHeaders>true</xadditionalHeaders>
                                <verbose>true</verbose>
                                <args>
                                    <arg>-Xnocompile</arg>
                                </args>
                                <wsdlUrls>
                                    <wsdlUrl>http://my.us:61168/MyProxy.svc?wsdl</wsdlUrl>
                                </wsdlUrls>
                            </configuration>
                        </execution>

It was working earlier but suddenly it stopped working.它早些时候工作,但突然停止工作。 No changes are done from my end.从我的角度来看,没有进行任何更改。

Java 1.7爪哇 1.7

Netbeans 8.1网豆 8.1

This is a problem of java version that runs eclipse.这是运行eclipse的java版本的问题。 In some cases it makes an exception.在某些情况下,它是一个例外。 Just add or change -vm argument in eclipse.ini.只需在 eclipse.ini 中添加或更改 -vm 参数即可。 For me it works for 1.8.0_66.对我来说,它适用于 1.8.0_66。

Just put in eclipse.ini file line:只需放入 eclipse.ini 文件行:

-vm C:\Java\JDK\bin\javaw.exe

If you have java in " program files " directory, remeber to write it in non space convention like Progra~1 and above -vmarg如果你在“程序文件”目录下有java,记得把它写成非空间约定,如Progra~1及以上-vmarg

检查环境变量中的 java 版本,无论您是否设置了相同的版本,我遇到了同样的问题,我在系统变量中设置了 1.8,我正在尝试使用 1.7 构建

it is not related to java version, we need to upgrade the versions of jaxws-maven-plugin,jaxb-impl to 2.2.`0 or more.与java版本无关,需要将jaxws-maven-plugin,jaxb-impl版本升级到2.2.`0以上。 if you still face the same issue please build your project with fresh repository(sometimes,it may faile to take the existed repository).in my case it works.如果您仍然面临同样的问题,请使用新的存储库构建您的项目(有时,可能无法采用现有的存储库)。在我的情况下,它可以工作。

I was using IntelliJ IDE.我正在使用 IntelliJ IDE。 I changed Java version to Open JDK 14. This JDK version was also set in the JAVA_HOME for the system.我将 Java 版本更改为 Open JDK 14。此 JDK 版本也在系统的 JAVA_HOME 中设置。 After reading about this problem it seems Java version was the problem.阅读有关此问题后,似乎 Java 版本是问题所在。 So i changed SDK within IntelliJ IDE, but that didn;t work.所以我在 IntelliJ IDE 中更改了 SDK,但这不起作用。 The problem resolved only after changing JAVA_HOME and pointed to JDK 8 version.问题只有在更改 JAVA_HOME 并指向 JDK 8 版本后才解决。

暂无
暂无

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

相关问题 “调用 com.sun.tools.ws.wscompile.WsimportTool 失败”使用 JDK 1.8 编译时出错 - “Invocation of com.sun.tools.ws.wscompile.WsimportTool failed” Error During Compilation With JDK 1.8 找不到com.sun.xml.rpc.tools.ant.Wscompile - com.sun.xml.rpc.tools.ant.Wscompile cannot be found 找不到参数jaxws()的方法[com.sun.xml.ws:jaxws-tools:2.1.4] - Could not find method jaxws() for arguments [com.sun.xml.ws:jaxws-tools:2.1.4] taskdef 类 com.sun.tools.ws.ant.WsImport 无法在“Java Web 服务教程”之后找到 - taskdef class com.sun.tools.ws.ant.WsImport cannot be found Following “The java web services tutorial” 无法读取com.sun.xml.ws:jaxws-rt:jar:2.2.8的工件描述符:UnresolvableModelException:无法传输com.sun.xml.ws:bundles:pom - Failed to read artifact descriptor for com.sun.xml.ws:jaxws-rt:jar:2.2.8: UnresolvableModelException: Failure to transfer com.sun.xml.ws:bundles:pom Javadoc生成失败:ClassCastException:com.sun.tools.javadoc.ClassDocImpl无法强制转换为com.sun.javadoc.AnnotationTypeDoc - Javadoc generation failed : ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc JavaFX 11 部署失败:无法创建任务或键入 javafx:com.sun.javafx.tools.ant:fileset - JavaFX 11 Deployment Failure: failed to create task or type javafx:com.sun.javafx.tools.ant:fileset 如何解决javac编译器错误“包com.sun.tools.internal.ws.processor.model不存在”? - How do I solve javac compiler error, “package com.sun.tools.internal.ws.processor.model does not exist”? com.sun.tools.javac.Main不在类路径中 - com.sun.tools.javac.Main is not on the classpath 缺少工件 com.sun:tools:jar - Missing artifact com.sun:tools:jar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM