axis2 java.lang.reflect.InvocationTargetException錯誤解決方案

來源:互聯網
上載者:User
在使用codegen1.3外掛程式來從WSDL產生代碼,到了最後一步竟然出然 了"An error occurred while completing process -java.lang.reflect.InvocationTargetException"的錯誤 
產生這種錯誤的原因一般有2種:首先關閉eclipse。  注意有可能是兩種錯誤同時出現
1.jar包缺失 
從AXIS2的LIB庫中複製"geronimo-stax-api_1.0_spec-1.0.1.jar"和"backport-util-concurrent-3.1.jar"檔案到Codegen的lib目錄中,同時修改plugin.xml檔案,添加 

<library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"> 
<export name="*"/> 
</library> 
<library name="lib/backport-util-concurrent-3.1.jar"> 
<export name="*"/> 
</library> 
2.版本問題 
F:\Program Files\MyEclipse 6.0\eclipse\plugins\Axis2_Codegen_Wizard_1.3.0\plugin.xml中 
<plugin 
   id="Axis2_Codegen_Wizard" 
   name="Axis2 Codegen Wizard Plug-in" 
   version="1.3.0" 
   provider-name="Apache Software Foundation" 
   class="org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin"& gt;看看自己下載的axis2版本是否和這個配置一致,像我的是axis2-1.5.1則需修改上面的配置為<plugin 
   id="Axis2_Codegen_Wizard" 
   name="Axis2 Codegen Wizard Plug-in" 
   version="1.5.1"         //對應的版本號碼 
   provider-name="Apache Software Foundation" 
   class="org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin">

然後再將檔案夾的名字Axis2_Codegen_Wizard_1.3.0改為Axis2_Codegen_Wizard_1.5.1 
修改完以上2步重新啟動eclipse即可。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.