Details

      Description

      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

        Activity

        Hide
        ctparker Charles Parker added a comment -

        I strongly support these recommendations. This ASM 3.3 dependency has confounded my build process for several years. It is impossible to build or deploy Struts2 applications with third party libraries that are dependent on ASM >= 4.0 due to the missing asm-commons-3.x EmptyVisitor class. For instance, FindBugs (ASM 5.0) cannot be run against Struts2 projects. For reference, the "incompatible classes" issue occurs during our build process as:

        Exception in thread "main" java.lang.IncompatibleClassChangeError: class edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM$1 has interface org.objectweb.asm.ClassVisitor as super class

        Show
        ctparker Charles Parker added a comment - I strongly support these recommendations. This ASM 3.3 dependency has confounded my build process for several years. It is impossible to build or deploy Struts2 applications with third party libraries that are dependent on ASM >= 4.0 due to the missing asm-commons-3.x EmptyVisitor class. For instance, FindBugs (ASM 5.0) cannot be run against Struts2 projects. For reference, the "incompatible classes" issue occurs during our build process as: Exception in thread "main" java.lang.IncompatibleClassChangeError: class edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM$1 has interface org.objectweb.asm.ClassVisitor as super class
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 8db9d8352f515de2bf714a174bec8f8a9248db0a in struts's branch refs/heads/master from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=8db9d83 ]

        WW-4646 Replaces ASM3 with the latest version of ASM5

        Show
        jira-bot ASF subversion and git services added a comment - Commit 8db9d8352f515de2bf714a174bec8f8a9248db0a in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=8db9d83 ] WW-4646 Replaces ASM3 with the latest version of ASM5
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Done

        Show
        lukaszlenart Lukasz Lenart added a comment - Done
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Struts-JDK7-master #492 (See https://builds.apache.org/job/Struts-JDK7-master/492/)
        WW-4646 Replaces ASM3 with the latest version of ASM5 (lukaszlenart: rev 8db9d8352f515de2bf714a174bec8f8a9248db0a)

        • plugins/pom.xml
        • core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java
        • plugins/java8-support/src/main/resources/LICENSE.txt
        • plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinderFactory.java
        • plugins/java8-support/src/main/resources/NOTICE.txt
        • plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java
        • plugins/java8-support/pom.xml
        • core/pom.xml
        • plugins/java8-support/src/main/resources/struts-plugin.xml
        • plugins/java8-support/README.adoc
        • plugins/java8-support/src/site/site.xml
        • pom.xml
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Struts-JDK7-master #492 (See https://builds.apache.org/job/Struts-JDK7-master/492/ ) WW-4646 Replaces ASM3 with the latest version of ASM5 (lukaszlenart: rev 8db9d8352f515de2bf714a174bec8f8a9248db0a) plugins/pom.xml core/src/main/java/com/opensymphony/xwork2/util/finder/DefaultClassFinder.java plugins/java8-support/src/main/resources/LICENSE.txt plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinderFactory.java plugins/java8-support/src/main/resources/NOTICE.txt plugins/java8-support/src/main/java/org/apache/struts2/convention/Java8ClassFinder.java plugins/java8-support/pom.xml core/pom.xml plugins/java8-support/src/main/resources/struts-plugin.xml plugins/java8-support/README.adoc plugins/java8-support/src/site/site.xml pom.xml
        Hide
        s.goetz Sebastian Götz added a comment -

        Good job! I am currently stumbling over this since we have already several action classes in the next release version that do not work since they use Java 8 lambda expressions. Before reverting to loop constructs I have tried to find out a release date for the 2.5.3 release with no success. Maybe Lukas can give me a hint. I need not to know an exact date. But I would be glad to hear if it will come this month.

        Show
        s.goetz Sebastian Götz added a comment - Good job! I am currently stumbling over this since we have already several action classes in the next release version that do not work since they use Java 8 lambda expressions. Before reverting to loop constructs I have tried to find out a release date for the 2.5.3 release with no success. Maybe Lukas can give me a hint. I need not to know an exact date. But I would be glad to hear if it will come this month.
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        There is no exact date but probably it will be at the end of August. And you can use the Java 8 Support plugin to solve your problems with ASM http://struts.apache.org/docs/java-8-support-plugin.html

        Show
        lukaszlenart Lukasz Lenart added a comment - There is no exact date but probably it will be at the end of August. And you can use the Java 8 Support plugin to solve your problems with ASM http://struts.apache.org/docs/java-8-support-plugin.html
        Hide
        s.goetz Sebastian Götz added a comment -

        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?

        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
        
        Show
        s.goetz Sebastian Götz added a comment - 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? 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
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        But did you use the plugin as well? And you must exclude ASM3 dependency in struts2-core (the docs are outdated )

        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>asm</groupId>
                    <artifactId>asm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>asm</groupId>
                    <artifactId>asm-commons</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        Show
        lukaszlenart Lukasz Lenart added a comment - But did you use the plugin as well? And you must exclude ASM3 dependency in struts2-core (the docs are outdated ) <dependency> <groupId> org.apache.struts </groupId> <artifactId> struts2-core </artifactId> <exclusions> <exclusion> <groupId> asm </groupId> <artifactId> asm </artifactId> </exclusion> <exclusion> <groupId> asm </groupId> <artifactId> asm-commons </artifactId> </exclusion> </exclusions> </dependency>
        Hide
        s.goetz Sebastian Götz added a comment - - edited

        Sure. I did explicitly exclude asm AND asm-commons via IVY exclude and then added asm AND asm-commons 5.1. I even investigated the success with the Eclipse Reverse Dependency Explorer (tool to visualize dependency hierarchy) AND did check the webapps deployment folder for libraries.

        EDIT:
        I had a look at the downloaded struts-convention-plugin.jar (2.5.2) and checked the file META-INF/DEPENDENCIES. There asm 3.3 is listed:

        From: 'ObjectWeb' (http://www.objectweb.org/)
          - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.3
            License: BSD  (http://asm.objectweb.org/license.html)
          - ASM Commons (http://asm.objectweb.org/asm-commons/) asm:asm-commons:jar:3.3
            License: BSD  (http://asm.objectweb.org/license.html)
          - ASM Tree (http://asm.objectweb.org/asm-tree/) asm:asm-tree:jar:3.3
            License: BSD  (http://asm.objectweb.org/license.html)
        
        Show
        s.goetz Sebastian Götz added a comment - - edited Sure. I did explicitly exclude asm AND asm-commons via IVY exclude and then added asm AND asm-commons 5.1. I even investigated the success with the Eclipse Reverse Dependency Explorer (tool to visualize dependency hierarchy) AND did check the webapps deployment folder for libraries. EDIT: I had a look at the downloaded struts-convention-plugin.jar (2.5.2) and checked the file META-INF/DEPENDENCIES. There asm 3.3 is listed: From: 'ObjectWeb' (http://www.objectweb.org/) - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.3 License: BSD (http://asm.objectweb.org/license.html) - ASM Commons (http://asm.objectweb.org/asm-commons/) asm:asm-commons:jar:3.3 License: BSD (http://asm.objectweb.org/license.html) - ASM Tree (http://asm.objectweb.org/asm-tree/) asm:asm-tree:jar:3.3 License: BSD (http://asm.objectweb.org/license.html)
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Looks like plugin wasn't loaded properly, strange. Can you define a bean in struts.xml

        <bean type="com.opensymphony.xwork2.util.finder.ClassFinderFactory" class="org.apache.struts2.convention.Java8ClassFinderFactory" scope="singleton"/>
        

        ?

        Show
        lukaszlenart Lukasz Lenart added a comment - Looks like plugin wasn't loaded properly, strange. Can you define a bean in struts.xml <bean type= "com.opensymphony.xwork2.util.finder.ClassFinderFactory" class= "org.apache.struts2.convention.Java8ClassFinderFactory" scope= "singleton" /> ?
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Yes, there are. The Convention plugin is using ASM3 by default, but this can be overwritten with the Java 8 Support plugin.

        Show
        lukaszlenart Lukasz Lenart added a comment - Yes, there are. The Convention plugin is using ASM3 by default, but this can be overwritten with the Java 8 Support plugin.
        Hide
        s.goetz Sebastian Götz added a comment -

        To me it looks more like the content of the convention-plugin jar is not what it should be. I defined the bean you as you suggested. But it failed with the exception below. Opening the jar file shows me, that there actually is no Java8ClassFinderFactory class inside. Could someone verify that the jar is correct?

        ERROR Dispatcher Dispatcher initialization failed
         Unable to load configuration. - bean - file:/B:/deploy8/wtpwebapps/web-gui/WEB-INF/classes/struts.xml:40:151
        	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
        	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: Unable to load bean: type:com.opensymphony.xwork2.util.finder.ClassFinderFactory class:org.apache.struts2.convention.Java8ClassFinderFactory - bean - file:/B:/deploy8/wtpwebapps/web-gui/WEB-INF/classes/struts.xml:40:151
        	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:265)
        	at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:98)
        	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:163)
        	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
        	... 17 more
        Caused by: java.lang.ClassNotFoundException: org.apache.struts2.convention.Java8ClassFinderFactory
        	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
        	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
        	at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:176)
        	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:238)
        	... 20 more
        
        Show
        s.goetz Sebastian Götz added a comment - To me it looks more like the content of the convention-plugin jar is not what it should be. I defined the bean you as you suggested. But it failed with the exception below. Opening the jar file shows me, that there actually is no Java8ClassFinderFactory class inside. Could someone verify that the jar is correct? ERROR Dispatcher Dispatcher initialization failed Unable to load configuration. - bean - file:/B:/deploy8/wtpwebapps/web-gui/WEB-INF/classes/struts.xml:40:151 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) 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: Unable to load bean: type:com.opensymphony.xwork2.util.finder.ClassFinderFactory class:org.apache.struts2.convention.Java8ClassFinderFactory - bean - file:/B:/deploy8/wtpwebapps/web-gui/WEB-INF/classes/struts.xml:40:151 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:265) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:98) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:163) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 17 more Caused by: java.lang.ClassNotFoundException: org.apache.struts2.convention.Java8ClassFinderFactory at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:176) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:238) ... 20 more
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Just downloaded the jar from here [1] and it's ok - maybe you should clean up Ivy's cache?

        [1] http://repo1.maven.org/maven2/org/apache/struts/struts2-java8-support-plugin/2.5.2/

        Show
        lukaszlenart Lukasz Lenart added a comment - Just downloaded the jar from here [1] and it's ok - maybe you should clean up Ivy's cache? [1] http://repo1.maven.org/maven2/org/apache/struts/struts2-java8-support-plugin/2.5.2/
        Hide
        s.goetz Sebastian Götz added a comment -

        Thanks a lot Lukasz.
        I did not understand that I had to include the java8-support-plugin explicitly. Now after including it even my Lamba-expression action classes are loaded and fully functional.

        Show
        s.goetz Sebastian Götz added a comment - Thanks a lot Lukasz. I did not understand that I had to include the java8-support-plugin explicitly. Now after including it even my Lamba-expression action classes are loaded and fully functional.

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            abrin adam brin
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development