[jboss-jira] [JBoss JIRA] Commented: (JASSIST-141) Failed to transform class with name com.some.class. Reason: null

Andreas Don'tAskDon'tTell (JIRA) jira-events at lists.jboss.org
Tue May 17 12:11:00 EDT 2011


    [ https://issues.jboss.org/browse/JASSIST-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602637#comment-12602637 ] 

Andreas Don'tAskDon'tTell commented on JASSIST-141:
---------------------------------------------------

Ok, ty so far, i will check this with my boss.
Is there any chance to figure out what line of code (or at least what instruction set) triggers the error?

> Failed to transform class with name com.some.class. Reason: null
> ----------------------------------------------------------------
>
>                 Key: JASSIST-141
>                 URL: https://issues.jboss.org/browse/JASSIST-141
>             Project: Javassist
>          Issue Type: Bug
>    Affects Versions: 3.14.0.GA
>         Environment: eclipse, powermock 1.4.8, easymock 3, junit 4.8, javassist 3.14.0.GA
>            Reporter: Andreas Don'tAskDon'tTell
>            Assignee: Shigeru Chiba
>              Labels: mapmaker, powermock
>
> Hi,
> i get this error while using the @PrepareForTest() annotation from the powermock framework.
> This framework uses javassist for bytecode manipulation and i think it's more a javassist bug then a powermock bug.
> the code i try to parse is 2500 lines long (i know bad bad bad code but it's not mine, i only need to test it). i do not want to post all. If you could help me to debug the hole file with javassist to find the methodes or statments that produces this error, i am happy to do so. Is there some debuging level or something to check where javassist crashes?
> Thankyou for now :D
> Yours,
> Andreas
> and here the stacktrace:
> java.lang.IllegalStateException: Failed to transform class with name com.some.class. Reason: null
> 	at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:207)
> 	at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:145)
> 	at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:65)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:247)
> 	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
> 	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
> 	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
> 	at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:370)
> 	at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:351)
> 	at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
> 	at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
> 	at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
> 	at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
> 	at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
> 	at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
> 	at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
> 	at java.lang.Class.getAnnotations(Class.java:3050)
> 	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.classAnnotations(PowerMockJUnit44RunnerDelegateImpl.java:163)
> 	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.getDescription(PowerMockJUnit44RunnerDelegateImpl.java:155)
> 	at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.getDescription(JUnit4TestSuiteChunkerImpl.java:172)
> 	at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.getDescription(AbstractCommonPowerMockRunner.java:47)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.sendTree(JUnit4TestClassReference.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.sendTrees(RemoteTestRunner.java:476)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:464)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: java.lang.NullPointerException
> 	at javassist.bytecode.stackmap.Tracer.checkParamTypes(Tracer.java:888)
> 	at javassist.bytecode.stackmap.Tracer.doInvokeMethod(Tracer.java:822)
> 	at javassist.bytecode.stackmap.Tracer.doOpcode148_201(Tracer.java:620)
> 	at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:102)
> 	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182)
> 	at javassist.bytecode.stackmap.MapMaker.traceException(MapMaker.java:213)
> 	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:175)
> 	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
> 	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
> =====================================================================================================================
> 243 times this line :	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
> =====================================================================================================================
> 	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141)
> 	at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96)
> 	at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416)
> 	at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398)
> 	at javassist.expr.ExprEditor.doit(ExprEditor.java:112)
> 	at javassist.CtClassType.instrument(CtClassType.java:1384)
> 	at org.powermock.core.transformers.impl.MainMockTransformer.transform(MainMockTransformer.java:77)
> 	at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:203)
> 	... 28 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list