OSDir


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Commented] (ARIES-1219) Weaving of Aries SPI Fly bundle produces RuntimeException: JSR/RET are not supported with computeFrames option


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

Kyle Stiemann commented on ARIES-1219:
--------------------------------------

[~elenigiannak], I know this is an old issue, but I believe this type of problem occurs when SPI-Fly attempts to weave the bytecode of classes with {{jsr}} or {{ret}} bytecode instruction. As far as I know, compiling with [{{javac}} target 1.5 and below|https://stackoverflow.com/questions/19381417/compile-error-jsr-ret-are-not-supported-with-computeframes-option] or [Eclipse JDT 3.1+ with target 1.4 and below|https://www.eclipse.org/jdt/core/r3.1/index.php] will cause these bytecode instructions to be emitted. SPI-Fly is probably attempting to perform bytecode weaving for classes that were compiled via {{javac}} with target 1.5 or below or Eclipse with target 1.4 or below. The solution to this problem is to recompile all code that SPI-Fly may touch with {{javac}} target 1.6+ or Eclipse target 1.5+.

To the maintainers, it might be possible to handle {{jsr}} and {{ret}} instructions with ASM's [{{JSRInlinerAdapter}}|https://asm.ow2.io/javadoc/org/objectweb/asm/commons/JSRInlinerAdapter.html]. Alternatively, it may be helpful to provide a better error message for this error. [In the Liferay Faces OSGi Weaver, we detect when classes are compiled with target 1.5 or lower, skip weaving them, and log an error message|https://github.com/stiemannkj1/liferay-faces-osgi-weaver/commit/d1b9f7cb6183073df7300e2c67290f655e37830b].

> Weaving of Aries SPI Fly bundle produces RuntimeException: JSR/RET are not supported with computeFrames option
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-1219
>                 URL: https://issues.apache.org/jira/browse/ARIES-1219
>             Project: Aries
>          Issue Type: Question
>         Environment: Apache Karaf 3.0.1
>            Reporter: Eleni Giannakopoulou
>            Priority: Major
>              Labels: Fly, JSR/RET, Karaf, SPI
>
> Trying to integrate jBPM6 in Apache Karaf 3.0.1, we came across with ServiceLoader.load() issues and for that reason we have used dynamic weaving of Aries SPI Fly.
> While some classloading of jBPM classes, we get the following exception:
> java.lang.ClassFormatError: Weaving hook failed.
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2074)
> 	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1501)
> 	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_45]
> ...
> Caused by: java.lang.RuntimeException: JSR/RET are not supported with computeFrames option
> 	at org.objectweb.asm.Frame.a(Unknown Source)
> 	at org.objectweb.asm.MethodWriter.visitJumpInsn(Unknown Source)
> 	at org.objectweb.asm.MethodVisitor.visitJumpInsn(Unknown Source)
> 	at org.objectweb.asm.ClassReader.a(Unknown Source)
> 	at org.objectweb.asm.ClassReader.b(Unknown Source)
> 	at org.objectweb.asm.ClassReader.accept(Unknown Source)
> 	at org.objectweb.asm.ClassReader.accept(Unknown Source)
> 	at org.apache.aries.spifly.dynamic.ClientWeavingHook.weave(ClientWeavingHook.java:61)
> 	at org.apache.felix.framework.util.SecureAction.invokeWeavingHook(SecureAction.java:1127)
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2057)
> It seems that there is a problem with StackMap tables used in jBPM6. jBPM6 has been built using JDK 1.6.0_45 and the JVM runs 1.7.0_45.
> Any suggestions would be appreciated as this is a blocking issue for us.
> Thank you in advance,
> Eleni.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)