Illegal type for StackMapType: 12

60 views
Skip to first unread message

fjcarretero

unread,
Jul 19, 2018, 5:12:52 AM7/19/18
to reflectasm-users
Hi,

I have been making a PoC with graphql for a project. 

I have seen that graphql uses underneath RefectASM (version 1.11.3) and I have a problem. Simplifying, in graphql, you define a method in a file to retrieve data. GraphQL uses RelectASM to call this method. For what I have seen, ReflectASM generates a class to make more efficient this reflection call.

My application is based on Spring, and it uses spring-instrument (aspectjweaver) as a java agent. This class generated by ReflectASM, is passed through the agent and is throwing that exception ("Illegal type for StackMapType: 12")

This is the relevan stacktrace:
java.lang.RuntimeException: Illegal type for StackMapType: 12
at org.aspectj.apache.bcel.classfile.StackMapType.setType(StackMapType.java:102)
at org.aspectj.apache.bcel.classfile.StackMapType.<init>(StackMapType.java:95)
at org.aspectj.apache.bcel.classfile.StackMapType.<init>(StackMapType.java:82)
at org.aspectj.apache.bcel.classfile.StackMapEntry.<init>(StackMapEntry.java:90)
at org.aspectj.apache.bcel.classfile.StackMap.<init>(StackMap.java:109)
at org.aspectj.apache.bcel.classfile.Attribute.readAttribute(Attribute.java:147)
at org.aspectj.apache.bcel.classfile.AttributeUtils.readAttributes(AttributeUtils.java:19)
at org.aspectj.apache.bcel.classfile.Code.<init>(Code.java:118)
at org.aspectj.apache.bcel.classfile.Attribute.readAttribute(Attribute.java:131)
at org.aspectj.apache.bcel.classfile.AttributeUtils.readAttributes(AttributeUtils.java:19)
at org.aspectj.apache.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:97)
at org.aspectj.apache.bcel.classfile.Method.<init>(Method.java:97)
at org.aspectj.apache.bcel.classfile.ClassParser.readMethods(ClassParser.java:240)
at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:144)
at org.aspectj.weaver.bcel.Utility.makeJavaClass(Utility.java:472)
at org.aspectj.weaver.bcel.BcelWorld.addSourceObjectType(BcelWorld.java:512)
at org.aspectj.weaver.tools.WeavingAdaptor.ensureDelegateInitialized(WeavingAdaptor.java:513)
at org.aspectj.weaver.tools.WeavingAdaptor$WeavingClassFileProvider.<init>(WeavingAdaptor.java:843)
at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:526)
at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:363)
at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:121)
at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:54)
at org.springframework.context.weaving.AspectJWeavingEnabler$AspectJClassBypassingClassFileTransformer.transform(AspectJWeavingEnabler.java:108)
at org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver$FilteringClassFileTransformer.transform(InstrumentationLoadTimeWeaver.java:184)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.esotericsoftware.reflectasm.AccessClassLoader.defineClass(AccessClassLoader.java:98)
at com.esotericsoftware.reflectasm.MethodAccess.get(MethodAccess.java:275)
 

versions:

ReflectASM: 1.11.3
AspectJWeaver: 1.8.13
Spring: 4.3.13.RELEASE

Thanks

BR,
Felipe

Nate

unread,
Jul 19, 2018, 7:27:27 AM7/19/18
to reflecta...@googlegroups.com
I'm afraid it's hard to tell which library is at fault. It would help if you could simplify the problem as much as possible.


--
You received this message because you are subscribed to the "reflectasm-users" group.
http://groups.google.com/group/reflectasm-users
---
You received this message because you are subscribed to the Google Groups "reflectasm-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reflectasm-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages