您的位置:首页 > 编程语言 > Java开发

关于Axis2 Eclipse plugin在eclipse中不能使用的问题

2009-01-12 16:20 555 查看
       在开发axis2中,我在用到axis2的eclipse 插件是所遇到:Code Generator 在Finish 时产生Exception: java.lang.reflect.InvocationTargetException  这个问题,看到有很到像我一样的同胞遇到这个问题,查了很多资料终于在一篇英文文档中找出了解决方法 , 我的开发环境是 Myeclipse6.0 GA +axis1.4:

 

My solution (eclipse3.3+jdk6+win32)  (这个是文章作者的开发环境)
1.Copy  " geronimo-stax-api_1.0_spec-1.0.1.jar " and

" backport-util-concurrent-3.1.jar " from %axis2_home%/lib folder to eclipse/plugins

/Axis2_Codegen_Wizard_1.3.0/lib folder.

 

(从你下载的axis2 开发环境中copy  “backport-util-concurrent-3.1.jar”“geronimo-stax-api_1.0_spec-1.0.1.jar” 放到你下载的plugin解压后的Axis2_Codegen_Wizard_1.*.* 文件夹中。)

 

2.Modify plugins.xml in the same folder, add some code as following:

<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>
      ...
 </runtime>

(修改Axis2_Codegen_Wizard_1.*.* 文件夹中的plugin.xml添加以上内容 启动eclipse 即可)

 

For someone(eclipse 3.4 users?) this is enough to make the annoying exception disappeared. But if the generator still complains the same problem, u might need to do several steps more :

 

delete Axis2_Codegen_Wizard_1.3.0 from eclipse -> restart eclipse -> reinstall Axis2_Codegen_Wizard
4000
_1.3.0-> restart eclipse again.

 

One thing i've experienced with eclipse is that it caches some of the classes, plugin configurations. So eventhough u update the plugin or overwrite the existing one it uses this cached information for some reason.. stupid enough 

 

 

另一个axis2 插件配置出现的错误

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

In my case it worked then. Hope i could help you.

 

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息