struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4431) Java 8 support - lambda in action classes
Date Sun, 14 Dec 2014 18:40:13 GMT

     [ https://issues.apache.org/jira/browse/WW-4431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lukasz Lenart updated WW-4431:
------------------------------
    Fix Version/s: 2.5

> Java 8 support - lambda in action classes
> -----------------------------------------
>
>                 Key: WW-4431
>                 URL: https://issues.apache.org/jira/browse/WW-4431
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.3.16.3
>         Environment: Jdk 1.8
>            Reporter: PaweĊ‚ Wielgus
>            Priority: Minor
>              Labels: java8
>             Fix For: 2.5
>
>
> When there is any lamba expression placed inside of action class, during startup struts
is presenting error like below:
> com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
> SEVERE: Unable to read class [com.ppp.elsevier.struts.action.admin.spa.bannerBox.SampleAction]
> java.lang.ArrayIndexOutOfBoundsException: 10572
> 	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.getFilter(ApplicationFilterConfig.java:298)
> 	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
> 	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
> 	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
> 	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
> 	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> After this exception application is starting normally but SampleAction is not configured
and not accessible.
> If lambda expression is removed from action class (i.e. the lambda is moved to non action
class and referenced from inside action), all is working without problems.



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

Mime
View raw message