简体   繁体   中英

Issue when java version upgrade from 7 to 8 : org.jboss.classfilewriter.InvalidBytecodeException: Cannot load variable at 0

When I migrated java 7 to java 8, I see following exception. It works very well with java 7 but not with java8, could you help me on this.

Environment: java 8 and wildfly 8.2

> Caused by: org.jboss.classfilewriter.InvalidBytecodeException: Cannot
> load variable at 0. Local Variables: Local Variables: []  at
> org.jboss.classfilewriter.code.CodeAttribute.aload(CodeAttribute.java:185)
>   at
> org.jboss.invocation.proxy.ProxyFactory$ProxyMethodBodyCreator.overrideMethod(ProxyFactory.java:86)
>   at
> org.jboss.invocation.proxy.AbstractSubclassFactory.overrideMethod(AbstractSubclassFactory.java:106)
>   at
> org.jboss.invocation.proxy.AbstractSubclassFactory.addInterface(AbstractSubclassFactory.java:363)
>   at
> org.jboss.invocation.proxy.ProxyFactory.generateClass(ProxyFactory.java:286)
>   at
> org.jboss.invocation.proxy.AbstractClassFactory.buildClassDefinition(AbstractClassFactory.java:207)
>   at
> org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:160)
>   at
> org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:150)
>   at
> org.jboss.as.ejb3.component.stateless.StatelessComponentDescription$3.configure(StatelessComponentDescription.java:150)
>   at
> org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:68)
>   at
> org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
>   ... 6 more

It looks like it might be similar to WFLY-4316 , which has a resolution of 9.0.0.Beta1 .

Also, InvalidBytecodeException in WildFly 8 may be relevant:

This exception had nothing to do with the class WildFly complained about ... For some reason, lambdas don't work ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM