安裝AXIS2的代碼生成插件出現錯誤

 安裝AXIS2的代碼生成插件"axis2-eclipse-codegen-wizard",和服務打包插件"axis2-eclipse-service-archiver-wizard"後。
   在使用codegen插件來從WSDL生成JAVA代碼文件時,到了最後一步竟然出然了"An error occurred while completing process -java.lang.reflect.InvocationTargetException"的錯誤。解決方法如下:

   過程如下:從AXIS2的LIB庫中複製"geronimo-stax-api_1.0_spec-1.0.1.jar"和"backport-util-concurrent-3.1.jar"文件到Axis2_Codegen_Wizard_1.3.0的lib目錄中,同時修改Axis2_Codegen_Wizard_1.3.0下的plugin.xml文件,在<runtime>中添加

<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>
到plugin.xml文件中,保存後重新啓動EC即可!

我嘗試了以上還有錯誤,於是繼續找 發現了下面的解決辦法,搞定。。。。  哈哈

I tried all given hints. It still didnt work. I experimented a bit more and here is my solution:

1) Shutdown eclipse

2) Copying the "backport-util-concurrent-3.1.jar" from "$AXIS2_HOME/lib/" to "$ECLIPSE_HOME/plugins/Axis2_Codegen_Wizard_1.3.0/lib/"

3) Adding the following into the "runtime" element "$ECLIPSE_HOME/plugins/Axis2_Codegen_Wizard_1.3.0/plugin.xml" :

      <library name="lib/backport-util-concurrent-3.1.jar">
        <export name="*"/>
      </library>

4) In "$ECLIPSE_HOME/plugins/Axis2_Codegen_Wizard_1.3.0/plugin.xml" changing the version attribute of the "plugin" element from "1.3.0" to "1.4.0". This results still in the same exception. But leave it.

5) Now changing the version also in the plugin's folder name from "Axis2_Codegen_Wizard_1.3.0" to "Axis2_Codegen_Wizard_1.4.0".

6) Start eclipse and try the plugin

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章