From: Woodward, J. <Joh...@sa...> - 2005-03-22 16:55:18
|
=20 If I reverse the order in which I apply AspectJ and Cobertura, I can get over the "unknown attribute" error ... but then (like I've seen with JCoverage) some of my unit tests fail to run properly, and I get incorrect failed unit tests. It seems that aspectj must be applied before cobertura or jcoverage for some reason. =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 9:55 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Doesn't play well with AspectJ =20 Hmm, are the AspectJ jars in the classpath you use for the Cobertura ant taskdef? -Mark =20 =09 ________________________________ From: cob...@li... [mailto:cob...@li...] On Behalf Of Woodward, John Sent: Tuesday, March 22, 2005 10:53 AM To: cob...@li... Subject: [Cobertura-devel] Doesn't play well with AspectJ Another potential issue other than the jdk version is that it doesn't look like Cobertura plays well with AspectJ. After changing my jdk to 1.5 and attempting to just instrument the code with cobertura, I get the following: =20 [cobertura-instrument] Exception in thread "main" java.lang.IllegalArgumentException: Unknown attribute type: org.aspect j.weaver.WeaverVersion [cobertura-instrument] at org.objectweb.asm.Attribute.a(Unknown Source) [cobertura-instrument] at org.objectweb.asm.ClassWriter.toByteArray(Unknown Source) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:120 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.addInstrumentation(Main.java:172 ) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.parseArguments(Main.java:189) [cobertura-instrument] at net.sourceforge.cobertura.coverage.Main.main(Main.java:248) =20 =20 j =20 =20 =20 |