[fedora-java] Trouble building jmock 2.5.1
Orion Poplawski
orion at cora.nwra.com
Wed May 11 15:13:03 UTC 2011
On 05/11/2011 06:00 AM, Guido Grazioli wrote:
>> On 08:49:36 AM Wednesday, May 11, 2011 Orion Poplawski wrote:
>>> Error is during the tests:
>>>
>>> [junit] Testcase:
>>> testCanMockTypesFromADynamicClassLoader(org.jmock.test.unit.lib.JavaReflect
>>> ionImposteriserTests): Caused an ERROR
>>> [junit] Invalid superclass index 0 in class file $UniqueTypeName$
>>> [junit] java.lang.ClassFormatError: Invalid superclass index 0 in
>>> class file $UniqueTypeName$
>>> [junit] at java.lang.ClassLoader.defineClass1(Native Method)
>>> [junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>>> [junit] at java.lang.ClassLoader.defineClass(ClassLoader.java:480)
>>> [junit] at
>>> org.jmock.test.unit.support.SyntheticEmptyInterfaceClassLoader.synthesiseIn
>>> terface(SyntheticEmptyInterfaceClassLoader.java:43) [junit] at
>>> org.jmock.test.unit.support.SyntheticEmptyInterfaceClassLoader.findClass(Sy
>>> ntheticEmptyInterfaceClassLoader.java:25) [junit] at
>>> java.lang.ClassLoader.loadClass(ClassLoader.java:321) [junit] at
>>> java.lang.ClassLoader.loadClass(ClassLoader.java:266) [junit] at
>>> org.jmock.test.unit.lib.JavaReflectionImposteriserTests.testCanMockTypesFro
>>> mADynamicClassLoader(JavaReflectionImposteriserTests.java:38)
>>>
>>> I have no idea about this. I've applied two patches. One to use
>>> objectweb classes directly rather than from cglib, and one derived from
>>> the 2.6.0-RC2 release to support java 1.6.
>
> I think the problem depends on the version of asm you are using; the error
> is thrown on a call to a cglib method which your patch reroutes directly
> to asm.
>
Probably. It appears that cglib out in the wild simply rebundles asm (via
jarjar I think). On Fedora it dosn't, hence the need to use the original
objectweb-asm namespace. 2.5.1 use cglib 2.1_3. F15 has cglib 2.2.
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion at cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com
More information about the java-devel
mailing list