EJB3.0+Struts2.0在测试时,jboss启动异常
我用jboss-4.2.3.GA.
把项目打包成*.ear,并且部署到jboss中,启动服务器,没有异常.
把项目直接通过eclipse中的jboss部署(即打包为*.jar),启动服务器,没有异常.
当我把项目同时部署为*.ear和*.jar时(为了测试),启动服务器,就有异常. 如下:
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/jboss- 4.2.3.GA/server/default/tmp/deploy/tmp34800ccs.ear-contents/ccs-exp.war/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp34797struts2-core-2.0.11.2.jar!/struts-default.xml:30:72 - bean - jar:file:/C:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp34800ccs.ear-contents/ccs-exp.war/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
疑问: 我的这种测试方法(或者流程)是否正确?
请大家帮忙,谢谢!