struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Berg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4347) Support for JDK 8 Lambdas
Date Tue, 06 Jan 2015 12:05:35 GMT

    [ https://issues.apache.org/jira/browse/WW-4347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14266023#comment-14266023
] 

Erik Berg commented on WW-4347:
-------------------------------

Just tried 2.3.21 with the struts2-java8-support-plugin and the jdk8test.tar attached to this
issue. Unfortunately, received the following error:

{code}
2015-01-06 03:57:02,635 ERROR (org.apache.struts2.convention.Java8ClassFinder:42) - Unable
to read class [jdk8test.actions.Index]
java.lang.IncompatibleClassChangeError: class org.apache.struts2.convention.Java8ClassFinder$InfoBuildingClassVisitor
has interface org.objectweb.asm.ClassVisitor as super class
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1191)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1669)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
	at org.apache.struts2.convention.Java8ClassFinder.readClassDef(Java8ClassFinder.java:454)
	at org.apache.struts2.convention.Java8ClassFinder.<init>(Java8ClassFinder.java:104)
	at org.apache.struts2.convention.Java8ClassFinderFactory.buildClassFinder(Java8ClassFinderFactory.java:45)
	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildClassFinder(PackageBasedActionConfigBuilder.java:413)
	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:397)
	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:354)
	at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:274)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
	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:745)
2015-01-06 03:57:02,643 ERROR (org.apache.struts2.convention.Java8ClassFinder:42) - Unable
to read class [jdk8test.actions.Lambda]
java.lang.IncompatibleClassChangeError: org/apache/struts2/convention/Java8ClassFinder$InfoBuildingClassVisitor
	at org.apache.struts2.convention.Java8ClassFinder.readClassDef(Java8ClassFinder.java:454)
	at org.apache.struts2.convention.Java8ClassFinder.<init>(Java8ClassFinder.java:104)
	at org.apache.struts2.convention.Java8ClassFinderFactory.buildClassFinder(Java8ClassFinderFactory.java:45)
	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildClassFinder(PackageBasedActionConfigBuilder.java:413)
	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:397)
	at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:354)
	at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:274)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
	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:745)
Jan 06, 2015 3:57:02 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
{code}

> Support for JDK 8 Lambdas
> -------------------------
>
>                 Key: WW-4347
>                 URL: https://issues.apache.org/jira/browse/WW-4347
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Core Actions
>    Affects Versions: 2.3.16.3
>            Reporter: Erik Berg
>            Assignee: Lukasz Lenart
>              Labels: jdk8
>             Fix For: 2.3.21
>
>         Attachments: jdk8test.tar
>
>
> Struts stumbles when encountering lambda expressions in JDK 8. Looks like org.objwectweb.asm
dependency needs to be updated...
> {code}
> 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)
> {code}
> Simple test case attached.
> tar xvf jdk8test.tar
> cd jdk8test
> mvn tomcat7:run
> http://localhost:8080/jdk8test



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message