struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Struts2 configuration (struts.xml) and Convention Plugin not compatible with Java 8?
Date Wed, 18 Jun 2014 08:25:11 GMT
It can be part of 2.3.x as well, the plan is to be compatible with
JDK8 but not depend on it. Lambdas are implemented as anonymous
classes as far I can recall, so maybe improving ClassFinder in that
area would do the trick ;-)

2014-06-18 10:20 GMT+02:00 Paweł Wielgus <poulwiel@gmail.com>:
> Hi Łukasz,
> can i somehow help with this?
>
> Is it all about classloader black magic
> or a normal programer can make any progress with this subject.
>
> I understand that JDK8 is much more than just lambdas,
> so maybe i would be able to help with this "lambdas only" problem.
>
> I would be happy if S2.3.x would be abble to load such action classes
> but would not be fully compatible with JDK8.
> But maybe this is all or nothing case?
>
> Best greetings,
> Paweł Wielgus.
>
>
>
>
> 2014-06-18 10:08 GMT+02:00 Lukasz Lenart <lukaszlenart@apache.org>:
>> S2 isn't JDK8 compatible, it will be case for S2.5
>>
>>
>> 2014-06-18 10:04 GMT+02:00 Paweł Wielgus <poulwiel@gmail.com>:
>>> Hi all,
>>> does anyone know
>>> if this these exceptions [1][2] i see when staring application
>>> are the result of using lambda expressions inside actions?
>>>
>>> If i just move these lambdas out of action body
>>> to another class (helper)
>>> everything works just fine.
>>>
>>> How can i help to resolve this?
>>> I would love to have lambdas in action methods.
>>>
>>> Struts version is 2.3.16.3
>>> Java version is 1.8.0_05
>>>
>>> Best greetings,
>>> Paweł Wielgus.
>>>
>>>
>>>
>>> [1] - for action defined in struts.xml
>>>
>>> SEVERE: Unable to read class [com.ppp.elsevier.struts.action.JournalCoverAction]
>>> java.lang.ArrayIndexOutOfBoundsException: 51966
>>> at org.objectweb.asm.ClassReader.readUTF8(Unknown Source)
>>> 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)
>>>
>>>
>>>
>>> [2] - for action found by convention plugin
>>>
>>> SEVERE: Unable to read class
>>> [com.ppp.elsevier.struts.action.admin.reports.BuyedBookCategoriesAction]
>>> java.lang.ArrayIndexOutOfBoundsException: 12919
>>> at org.objectweb.asm.ClassReader.<init>(Unknown Source)
>>> at org.objectweb.asm.ClassReader.<init>(Unknown Source)
>>> at org.objectweb.asm.ClassReader.<init>(Unknown Source)
>>> at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:716)
>>> 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)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message