简体   繁体   English

如何解决NetBeans中的wsimport错误?

[英]How do I troubleshoot this wsimport error in NetBeans?

I'm using NetBeans 6.9.1 on Mac OS X 10.6.4 with Java 1.6.0_22. 我在具有Java 1.6.0_22的Mac OS X 10.6.4上使用NetBeans 6.9.1。 I have a web application that connects to an application server (GlassFish v3) via JAX-WS. 我有一个Web应用程序,它通过JAX-WS连接到应用程序服务器(GlassFish v3)。 During the "Clean and Build" process, wsimport is called to import the stored WSDL files. 在“清理和构建”过程中,将调用wsimport来导入存储的WSDL文件。 For some reason, I can only successfully perform a "Clean and Build" once after starting NetBeans. 由于某些原因,启动NetBeans后,我只能成功执行一次“清理并生成”。 Every subsequent attempt fails with this error: 以后的每次尝试都会失败,并显示以下错误:

init:
undeploy-clean:
deps-clean:
do-clean:
Deleting directory /Users/justin/Development/flower_vs/build
Deleting directory /Users/justin/Development/flower_vs/dist
check-clean:
clean:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
wsimport-init:
Created dir: /Users/justin/Development/flower_vs/build/generated-sources/jax-ws
wsimport-client-ChartDataService:
Created dir: /Users/justin/Development/flower_vs/build/generated/jax-wsCache/ChartDataService
command line: wsimport -d /Users/justin/Development/flower_vs/build/generated/jax-wsCache/ChartDataService -extension -Xnocompile -Xendorsed -keep -s /Users/justin/Development/flower_vs/build/generated/jax-wsCache/ChartDataService -catalog /Users/justin/Development/flower_vs/catalog.xml -verbose /Users/justin/Development/flower_vs/src/conf/xml-resources/web-service-references/ChartDataService/wsdl/dev_8080/flower/analysis/ChartDataService.wsdl -p name.justinthomas.flower.analysis.services.ChartData -wsdllocation http://dev:8080/flower/analysis/ChartDataService?wsdl
/Users/justin/Development/flower_vs/nbproject/jaxws-build.xml:31: Error starting wsimport: 
BUILD FAILED (total time: 1 second)

The noted line is the "wsimport" directive in this target: 上面提到的行是此目标中的“ wsimport”指令:

<target name="wsimport-client-ChartDataService" depends="wsimport-init">
  <mkdir dir="${build.generated.dir}/jax-wsCache/ChartDataService"/>
  <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/ChartDataService" destdir="${build.generated.dir}/jax-wsCache/ChartDataService" wsdl="${basedir}/${conf-dir}xml-resources/web-service-references/ChartDataService/wsdl/dev_8080/flower/analysis/ChartDataService.wsdl" catalog="catalog.xml" extension="true" verbose="true" wsdlLocation="http://dev:8080/flower/analysis/ChartDataService?wsdl" xnocompile="true" xendorsed="true" package="name.justinthomas.flower.analysis.services.ChartData">
    <depends file="${basedir}/${conf-dir}xml-resources/web-service-references/ChartDataService/wsdl/dev_8080/flower/analysis/ChartDataService.wsdl"/>
    <produces dir="${build.generated.dir}/jax-wsCache/ChartDataService"/>
  </wsimport>
  <copy todir="${build.generated.sources.dir}/jax-ws">
    <fileset dir="${build.generated.dir}/jax-wsCache/ChartDataService">
       <include name="**/*.java"/>
    </fileset>
  </copy>
</target>

I can run the wsimport line manually (copy and pasted) from the command line successfully. 我可以从命令行成功手动运行wsimport行(复制和粘贴)。 When I do so, NetBeans then errors on the next web service target. 当我这样做时,NetBeans然后在下一个Web服务目标上出错。

To correct this error, I have to close NetBeans and restart. 要更正此错误,我必须关闭NetBeans并重新启动。 Once I do that, I can once again perform one "Clean and Build" before I'm stuck again. 一旦这样做,我就可以再次执行“清理并构建”操作,然后再被卡住。

I only see this problem on my Mac - my NetBeans install on Windows 7 does not have this problem, but I can't find any differences in the configuration that might account for the Mac problems. 我只在Mac上看到此问题-在Windows 7上安装的NetBeans没有此问题,但是在配置上找不到任何可能导致Mac问题的差异。

It's clear that the error message I'm getting for wsimport is woefully unhelpful. 很明显,我为wsimport收到的错误消息是毫无帮助的。 I can't seem to figure out how to get more verbose error messages to figure out what is actually going on. 我似乎无法弄清楚如何获取更多详细的错误消息以弄清楚实际情况。 Do you know how I might do that? 你知道我会怎么做吗? I'm guessing that a library is being loaded that is causing a conflict, but I don't know where to start in tracking down where that problem is. 我猜测正在加载的库导致冲突,但是我不知道从哪里开始跟踪问题所在。

Thank you in advance! 先感谢您!

I was having this same error. 我遇到了同样的错误。 To fix it all I did was remove 要解决它,我所做的就是删除

catalog="catalog.xml"

from the wsimport tag attributes and so far I have not had any problems, I can clean and build as often as I want in NetBeans 6.9. 从wsimport标记属性开始,到目前为止,我还没有遇到任何问题,我可以在NetBeans 6.9中随意清理和构建。 Yours would look like this: 您的看起来像这样:

<target name="wsimport-client-ChartDataService" depends="wsimport-init">
  <mkdir dir="${build.generated.dir}/jax-wsCache/ChartDataService"/>
  <wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/ChartDataService"   destdir="${build.generated.dir}/jax-wsCache/ChartDataService" wsdl="${basedir}/${conf-dir}xml-resources/web-service-references/ChartDataService/wsdl/dev_8080/flower/analysis/ChartDataService.wsdl" extension="true" verbose="true" wsdlLocation="http://dev:8080/flower/analysis/ChartDataService?wsdl" xnocompile="true" xendorsed="true" package="name.justinthomas.flower.analysis.services.ChartData">
    <depends file="${basedir}/${conf-dir}xml-resources/web-service-references/ChartDataService/wsdl/dev_8080/flower/analysis/ChartDataService.wsdl"/>
    <produces dir="${build.generated.dir}/jax-wsCache/ChartDataService"/>
  </wsimport>
  <copy todir="${build.generated.sources.dir}/jax-ws">
  <fileset dir="${build.generated.dir}/jax-wsCache/ChartDataService">
     <include name="**/*.java"/>
   </fileset>
  </copy>
</target>

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

相关问题 在Netbeans + Ant中,如何避免wsimport每次构建都重建Web服务客户端? - In Netbeans+Ant, how do I avoid wsimport rebuilding web service clients every build? 如何使wsimport生成构造函数? - How do I make wsimport generate constructors? 如何解决ANT“ exec”命令行错误消息? - How do I troubleshoot an ANT “exec” command line error message? 如何告诉wsimport使用代理例外URL - How do I tell wsimport to use a proxy exception url 如何扩展用 WebFault 注释的 wsimport 生成的异常? - How do I extend a wsimport-generated exception annotated with WebFault? 如何解决此 MQ 的问题 - How do I troubleshoot problems with this MQ 尝试从 Java 中的全名获取首字母时,如何解决 OutOfBoundsException 错误? - How do I troubleshoot an OutOfBoundsException error when trying to get initials from a full name in Java? 如何解决“检测到不一致:dl-lookup.c:111”(Java 结果 127)错误? - How do I troubleshoot "Inconsistency detected: dl-lookup.c: 111" (Java Result 127) error? 如何解决Axis 2错误 - How to troubleshoot Axis 2 Error 在构建项目时,如何让Intellij IDEA调用wsimport? - How do I get Intellij IDEA to call wsimport when I build my project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM