ahmaddarawshi / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

unable to resolve java.lang.ClassFormatError #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using 1.2.5 version of power mock

The operating system is windows.

I am getting the below error when trying to do the build, for one of the 
mock file written using power mock frame work.

I am able to run the test in eclipse but facing problem in the build.

Please let me know how to proceed as whole build is stuck because of this.

Exception in thread "main" java.lang.ClassFormatError: Invalid this class 
index 29708 in constant pool in class file com/network

    [junit]      at java.lang.ClassLoader.defineClass1(Native Method)

    [junit]      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

    [junit]      at java.lang.ClassLoader.defineClass(ClassLoader.java:465)

    [junit]      at 
org.powermock.core.classloader.MockClassLoader.loadMockClass
(MockClassLoader.java:201)

    [junit]      at 
org.powermock.core.classloader.MockClassLoader.loadModifiedClass
(MockClassLoader.java:146)

    [junit]      at 
org.powermock.core.classloader.DeferSupportingClassLoader.loadClass
(DeferSupportingClassLoader.java:57)

    [junit]      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

    [junit]      at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:319)

    [junit]      at java.lang.Class.forName0(Native Method)

    [junit]      at java.lang.Class.forName(Class.java:242)

    [junit]      at 
sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType
(CoreReflectionFactory.java:95)

    [junit]      at 
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature
(Reifier.java:107)

    [junit]      at sun.reflect.generics.tree.ClassTypeSignature.accept
(ClassTypeSignature.java:31)

    [junit]      at sun.reflect.annotation.AnnotationParser.parseSig
(AnnotationParser.java:370)

    [junit]      at sun.reflect.annotation.AnnotationParser.parseClassValue
(AnnotationParser.java:351)

    [junit]      at sun.reflect.annotation.AnnotationParser.parseClassArray
(AnnotationParser.java:653)

    [junit]      at sun.reflect.annotation.AnnotationParser.parseArray
(AnnotationParser.java:460)

    [junit]      at 
sun.reflect.annotation.AnnotationParser.parseMemberValue
(AnnotationParser.java:286)

    [junit]      at sun.reflect.annotation.AnnotationParser.parseAnnotation
(AnnotationParser.java:222)

    [junit]      at 
sun.reflect.annotation.AnnotationParser.parseAnnotations2
(AnnotationParser.java:69)

    [junit]      at 
sun.reflect.annotation.AnnotationParser.parseAnnotations
(AnnotationParser.java:52)

    [junit]      at java.lang.Class.initAnnotationsIfNecessary
(Class.java:3031)

    [junit]      at java.lang.Class.getAnnotations(Class.java:3011)

    [junit]      at 
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateIm
pl.classAnnotations(PowerMockJUnit44RunnerDelegateImpl.java:173)

    [junit]      at 
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateIm
pl.getDescription(PowerMockJUnit44RunnerDelegateImpl.java:165)

    [junit]      at 
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateIm
pl.run(PowerMockJUnit44RunnerDelegateImpl.java:128)

    [junit]      at 
org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImp
l.run(JUnit4TestSuiteChunkerImpl.java:112)

    [junit]      at 
org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRu
nner.run(AbstractCommonPowerMockRunner.java:44)

    [junit]      at junit.framework.JUnit4TestAdapter.run
(JUnit4TestAdapter.java:36)

Original issue reported on code.google.com by vichhu...@yahoo.com on 17 Aug 2009 at 3:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hmm which version of Javassist are you using?

Original comment by johan.ha...@gmail.com on 17 Aug 2009 at 6:10

GoogleCodeExporter commented 9 years ago
Won't fix due to inactivity

Original comment by johan.ha...@gmail.com on 23 Mar 2010 at 7:32