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

Support for JDK 8 Lambdas

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.16.3
    • 2.3.24
    • Core Actions

    Description

      Struts stumbles when encountering lambda expressions in JDK 8. Looks like org.objwectweb.asm dependency needs to be updated...

      2014-05-18 10:21:41,111 ERROR (com.opensymphony.xwork2.util.finder.ClassFinder:38) - Unable to read class [jdk8test.actions.Lambda]
      java.lang.ArrayIndexOutOfBoundsException: 52264
      	at org.objectweb.asm.ClassReader.readClass(Unknown Source)
      	at org.objectweb.asm.ClassReader.accept(Unknown Source)
      	at org.objectweb.asm.ClassReader.accept(Unknown Source)
      	at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:717)
      	at com.opensymphony.xwork2.util.finder.ClassFinder.<init>(ClassFinder.java:112)
      	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:390)
      	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347)
      	at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
      	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:268)
      	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
      	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
      	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
      	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
      	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
      	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
      	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
      	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
      	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      	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:744)
      

      Simple test case attached.

      tar xvf jdk8test.tar
      cd jdk8test
      mvn tomcat7:run
      http://localhost:8080/jdk8test

      Attachments

        1. jdk8test.tar
          22 kB
          Erik Berg

        Issue Links

          Activity

            People

              lukaszlenart Lukasz Lenart
              eb Erik Berg
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: