[ https://issues.apache.org/jira/browse/WW-4646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15420643#comment-15420643 ]
Sebastian Götz commented on WW-4646: ------------------------------------ Thank you for that Lukasz. I was not Aware of that plugin. We use Apache Ivy for dependency resolution. But after excluding transitive asm 3.3 and asm-commons 3.3 dependencies from struts-core 2.5.2 and adding explicit asm 5.1 and asm-commons 5.1 I still have problems. From the stacktrace I would guess it is related to the convention plugin (we use Action annotations for URl mapping). Will this be fixed as well in 2.5.3? {noformat} java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2472) at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildClassFinder(PackageBasedActionConfigBuilder.java:397) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:379) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:335) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:197) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:897) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:437) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:478) at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4573) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5188) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.commons.EmptyVisitor at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) ... 30 more {noformat} > remove ASM 3 from struts2 > ------------------------- > > Key: WW-4646 > URL: https://issues.apache.org/jira/browse/WW-4646 > Project: Struts 2 > Issue Type: Bug > Components: Core Actions, Plugin - Convention > Affects Versions: 2.5 > Reporter: adam brin > Assignee: Lukasz Lenart > Fix For: 2.5.3 > > > Pulling from the discussion on the struts2-users list: > Struts2 maintains two different versions of ASM 5x for the Convention plugin > and 3x for the rest of struts. A basic search of the codebase suggests that > the only direct uses of ASM are via the ClassFinder class in Xwork and used > by the Convention plugin. Based on this > [https://issues.apache.org/jira/browse/WW-4435] and > [http://www.philvarner.com/2015/02/05/using-apache-cxf-2-7-struts2-2-3-and-asm-5-with-maven/], > I wonder if it might make sense to: > 1. remove the direct dependency on ASM entirely for XWork and Struts2 in > general > 2. move the ClassFinder class and direct dependencies the convention plugin > and make them explicitly dependent on ASM 5x. > 3. Like other apps like Spring, repackage/embed ASM into it's own package > tree so it can live with other versions of ASM. > ----- > the core issue for us is that there are overlaps between ASM 5 and ASM 3, and > become explicit when launching our app with the maven-jetty-plugin. Classes > with the same name in both packages though they have different groupIds and > thus cause exceptions in startup either due to (a) Missing Classes like > EmptyVisitor or (b) incompatible classes. It's our hope that by removing this > dual dependency, we can take advantage of Java8 features and also simplify > dependency management in our pom. > thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)