简体   繁体   English

Netbeans 6.5和Glassfish V2上的jaxWS问题

[英]jaxWS issue on Netbeans 6.5 and Glassfish V2

i am not able to build Web Service Client, it is showing an error msg : You are running on JDK6 which comes with JAX-WS 2.1 API, but this tool requires JAX-WS 2.2 API. 我无法构建Web Service Client,它显示错误消息: 您正在运行JAX-WS 2.1 API附带的JDK6,但是此工具需要JAX-WS 2.2 API。 Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on . 使用认可的标准替代机制(http://java.sun.com/javase/6/docs/technotes/guides/standards/),或在上设置xendorsed =“ true”。 BUILD FAILED (total time: 0 seconds) 生成失败(总时间:0秒)

can any one help me out to solve this ... Thanks in Advance :) 任何人都可以帮我解决这个问题吗?在此先感谢:)

Check the JDK configuration being ran by the IDE, 检查IDE正在运行的JDK配置,

When using Netbeans, 使用Netbeans时,

Step 1: 第1步:

Find the Netbeans.conf file (C:\\Program Files\\NetBeans7.0\\etc\\netbeans.conf) 查找Netbeans.conf文件(C:\\ Program Files \\ NetBeans7.0 \\ etc \\ netbeans.conf)

Step 2: 第2步:

Change "netbeans_jdkhome" to point to the newer JDK (ie netbeans_jdkhome="C:\\Program Files\\Java\\jdk1.7.0_80") 更改“ netbeans_jdkhome”以指向较新的JDK(即netbeans_jdkhome =“ C:\\ Program Files \\ Java \\ jdk1.7.0_80”)

Note: Try similar steps for other IDEs 注意:对于其他IDE,请尝试类似的步骤

Are you running on Unix? 您在Unix上运行吗? Is the wsimport in your path in the glassfish directory or the Java install directory? wsimport是在glassfish目录还是Java安装目录中的路径中? I seem to remember getting this and changing my path so I got the wsimport from glassfish. 我似乎记得记住了这一点并改变了自己的道路,所以我从玻璃鱼那里得到了wsimport。

I don't know main cause but i think sometimes IDE causes that. 我不知道主要原因,但我认为有时是IDE引起的。 Deleting WS reference and adding ws client again works for me sometimes. 有时,删除WS参考并再次添加ws客户端对我有用。

Just click on netbeans generated error link (by clicking on it, netbeans will open jaxws-build.xml & goes to wsimport tag definition line) & add attribute xendorsed="true" somewhere in "wsimport" tag. 只需单击netbeans生成的错误链接(通过单击它,netbeans将打开jaxws-build.xml并转到wsimport标记定义行)并在“ wsimport”标记中的某处添加属性xendorsed="true"
Or you can download & add JAX-WS 2.2 API jar file in your project classpath. 或者,您可以在项目类路径中下载并添加JAX-WS 2.2 API jar文件。

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

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