Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5074

Multiple ASM jar conflict in 2.6 build

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 6.0.0
    • 6.0.0
    • Core
    • Any.

    Description

      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:


      |  \- 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
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jchaplin James Chaplin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h