James Chaplin created WW-5074:
---------------------------------
Summary: Multiple ASM jar conflict in 2.6 build
Key: WW-5074
URL: https://issues.apache.org/jira/browse/WW-5074
Project: Struts 2
Issue Type: Bug
Components: Core
Affects Versions: 2.6
Environment: Any.
Reporter: James Chaplin
Fix For: 2.6
Hello Apache Struts Team.
During local testing of the 2.6 Showcase applications, some weird errors were
seen on the application server console logs. After some digging it was
determined to be the result of more than one ASM version jar being present in
the 2.6 build libraries, and carried into the Showcase applications.
I am guessing this probably came about as a side-effect of WW-5047 or WW-5068,
but did not confirm that for certain. The 2.6 build ends up with both ASM 7.x
and 3.x jars present, which causes sporadic issues during runtime for both
Showcase applications (builds fine).
A review of the Maven dependency tree shows multiple occurrences of:
----
{code:java}
| \- org.apache.struts:struts2-velocity-plugin:jar:2.6-SNAPSHOT:compile
| +- org.apache.velocity:velocity-engine-core:jar:2.2:compile
| +- org.apache.velocity.tools:velocity-tools-view:jar:3.0:compile
| | +- org.apache.velocity.tools:velocity-tools-generic:jar:3.0:compile
| | | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
| | | | \- commons-collections:commons-collections:jar:3.2.2:compile
| | | \- com.github.cliftonlabs:json-simple:jar:3.0.2:compile
| | \- org.apache.commons:commons-digester3:jar:3.2:compile
| | \- cglib:cglib:jar:2.2.2:compile
| | \- asm:asm:jar:3.3.1:compile
| \- org.apache.velocity.tools:velocity-tools-view-jsp:jar:3.0:compile
{code}
----
which seems to indicate ASM 3.3.1 is included due to
velocity-tools-view/commons-digester3/cglib dependencies.
This issue +does not impact the 2.5.x builds+ (2.5.22 or 2.5.23-SNAPSHOT),
+only the 2.6 build+.
After some trial-and-error it looks like a workaround limited to modification
of 2 POMs in the project resolves the issue. A PR with a proposed fix to do
this will follow shortly.
Removing the ASM 3.3.1 jar manually also works, but it would be better to avoid
the issue at build time if possible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)