小菜毛毛技术分享

与大家共同成长

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  164 Posts :: 141 Stories :: 94 Comments :: 0 Trackbacks

转载  axis2 java.lang.reflect.InvocationTargetException 收藏

http://loshamo.javaeye.com/blog/627020

[i][/i]在使用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即可。
posted on 2010-10-11 17:29 小菜毛毛 阅读(3888) 评论(2)  编辑  收藏 所属分类: webservice

Feedback

# re: axis2 java.lang.reflect.InvocationTargetException [未登录] 2011-09-29 09:28 Sam
顶  回复  更多评论
  

# re: axis2 java.lang.reflect.InvocationTargetException [未登录] 2011-09-29 09:29 Sam
试了好几天,改了版本问题,果然对了,太感谢你了,菜毛!  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: