2010-11-19 49 views
1

我在Mac OS X 10.6.4和Java 1.6.0_22上使用NetBeans 6.9.1。我有一個通過JAX-WS連接到應用程序服務器(GlassFish v3)的Web應用程序。在「清理和構建」過程中,調用wsimport來導入存儲的WSDL文件。出於某種原因,我只能在啓動NetBeans後成功執行一次「清理和構建」。以後的每一次嘗試失敗,此錯誤:如何解決NetBeans中的此wsimport錯誤?

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) 

注意的行是「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> 

我可以手動運行的wsimport線(複製和粘貼)從命令行成功。當我這樣做時,NetBeans會在下一個Web服務目標上出現錯誤。

要更正此錯誤,我必須關閉NetBeans並重新啓動。一旦我這樣做,我可以再次執行一個「清潔和構建」,然後再次卡住。

我只在Mac上看到此問題 - 在Windows 7上安裝的NetBeans不存在此問題,但在配置中找不到可能導致Mac問題的任何差異。

很明顯,我爲wsimport收到的錯誤信息是非常無益的。我似乎無法弄清楚如何獲得更詳細的錯誤信息來找出實際發生的事情。你知道我該怎麼做嗎?我猜測一個圖書館正在加載導致衝突,但我不知道從哪裏開始追蹤問題出在哪裏。

預先感謝您!

回答

3

我有這個相同的錯誤。要解決這一切我所做的就是從wsimport的標籤屬性刪除

catalog="catalog.xml" 

,到目前爲止,我還沒有任何問題,我可以清潔,經常因爲我想在NetBeans 6.9構建。你的看起來是這樣的:

<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> 
+0

太棒了;那就是訣竅。謝謝! – 2010-12-10 06:26:09

+0

太神奇了,謝謝 – 2011-06-27 08:15:43