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. I have a web application that connects to an application server (GlassFish v3) via JAX-WS. During the "Clean and Build" process, wsimport is called to import the stored WSDL files. For some reason, I can only successfully perform a "Clean and Build" once after starting 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:
<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. When I do so, NetBeans then errors on the next web service target.
To correct this error, I have to close NetBeans and restart. 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.
It's clear that the error message I'm getting for wsimport is woefully unhelpful. 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, bu开发者_StackOverflow中文版t 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. 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>
精彩评论