Ronnie76er/jmeter-maven-plugin — Issue #27: struts2 + jmeter integration test	
Author: vraskin
Created: 2012-02-03 21:23:28+00:00
State: open

Hi,

I have been banging my head against the wall over this issue.

Set up
Appfuse 2.1, Struts 2 archetype
Integration-test with jMeter maven plugin error
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name
xwork has already been loaded by bean -
jar:file:/E:/proj/struts_branch/target/core-1.0-SNAPSHOT/WEB-INF/lib/struts2-core-2.3.1.2.jar!/struts-default.xml:29:72
- bean -
jar:file:/C:/Users/wmyuan/.m2/repository/org/apache/struts/struts2-core/2.3.1.2/struts2-core-2.3.1.2.jar!/struts-default.xml:29:72
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:219)

Googling this error message yields quite a few hits, as far as I can tell the
suggested solution has always been to remove the additional copy of the struts
jar from some undesired locations. In my case though, both locations seem to be
correct, but rather the fact that they are both on the classpath is causing
xwork to panic. When I ran mvn in debug mode, I see indeed jars are loaded twice
from both my local repository and web-inf/lib (not just the struts jar). At this
point, I am not sure whether this is a jetty or jmeter plugin problem. I suspect
latter as mvn jetty:run-war works just fine. Any ideas?

Many thanks in advance.