struts2 - Make Struts 2 compatible with Java 8 (legacy ASM 3) -
i'm using struts 2 convention plugin. struts 2 depends on asm 3.3 isn't compatible java 8. fails discover action classes contain lambdas or method references.
the exception:
2014-06-27 18:47:32,958 error main/com.opensymphony.xwork2.util.finder.classfinder: unable read class [my.project.action] java.lang.arrayindexoutofboundsexception: 30305 @ org.objectweb.asm.classreader.readclass(unknown source) @ org.objectweb.asm.classreader.accept(unknown source) @ org.objectweb.asm.classreader.accept(unknown source) @ com.opensymphony.xwork2.util.finder.classfinder.readclassdef(classfinder.java:717) @ com.opensymphony.xwork2.util.finder.classfinder.<init>(classfinder.java:112) @ org.apache.struts2.convention.packagebasedactionconfigbuilder.findactions(packagebasedactionconfigbuilder.java:390) @ org.apache.struts2.convention.packagebasedactionconfigbuilder.buildactionconfigs(packagebasedactionconfigbuilder.java:347) @ org.apache.struts2.convention.classpathpackageprovider.loadpackages(classpathpackageprovider.java:53) @ com.opensymphony.xwork2.config.impl.defaultconfiguration.reloadcontainer(defaultconfiguration.java:268) @ com.opensymphony.xwork2.config.configurationmanager.getconfiguration(configurationmanager.java:67) @ org.apache.struts2.dispatcher.dispatcher.init_preloadconfiguration(dispatcher.java:445) @ org.apache.struts2.dispatcher.dispatcher.init(dispatcher.java:489) @ org.apache.struts2.dispatcher.ng.initoperations.initdispatcher(initoperations.java:74) @ org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter.init(strutsprepareandexecutefilter.java:57)
asm 5 seems support java 8 struts isn't binary compatible that.
are there workarounds problems? right i'm considering patching struts/xwork.
guess - had patch thing.
the gist of it: https://gist.github.com/anonymous/017b23c1d7c97c37d167
Comments
Post a Comment