Pitclipse cannot find java/awt/GradientPaint on classpath

280 Views Asked by At

I have installed Pitclipse in my Eclipse. Also, I have some unit tests that can be run easily under junit4.

enter image description here

However, when I want to run them under the PIT, I face the following error:

3:22:17 PM PIT >> FINE : Could not find java/awt/GradientPaint on classpath for analysis. Falling back to classloader    
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 61
        at org.pitest.reloc.asm.ClassReader.<init>(ClassReader.java:196)
        at org.pitest.reloc.asm.ClassReader.<init>(ClassReader.java:177)
        at org.pitest.reloc.asm.ClassReader.<init>(ClassReader.java:163)
        at org.pitest.classinfo.ComputeClassWriter.typeInfo(ComputeClassWriter.java:192)
        at org.pitest.classinfo.ComputeClassWriter.getCommonSuperClass(ComputeClassWriter.java:71)
        at org.pitest.reloc.asm.SymbolTable.addMergedType(SymbolTable.java:1200)
        at org.pitest.reloc.asm.Frame.merge(Frame.java:1299)
        at org.pitest.reloc.asm.Frame.merge(Frame.java:1197)
        at org.pitest.reloc.asm.MethodWriter.computeAllFrames(MethodWriter.java:1610)
        at org.pitest.reloc.asm.MethodWriter.visitMaxs(MethodWriter.java:1546)
        at org.pitest.reloc.asm.MethodVisitor.visitMaxs(MethodVisitor.java:771)
        at org.pitest.reloc.asm.MethodVisitor.visitMaxs(MethodVisitor.java:771)
        at org.pitest.reloc.asm.MethodVisitor.visitMaxs(MethodVisitor.java:771)
        at org.pitest.reloc.asm.MethodVisitor.visitMaxs(MethodVisitor.java:771)
        at org.pitest.reloc.asm.MethodVisitor.visitMaxs(MethodVisitor.java:771)
        at org.pitest.reloc.asm.MethodVisitor.visitMaxs(MethodVisitor.java:771)
        at org.pitest.reloc.asm.tree.MethodNode.accept(MethodNode.java:767)
        at org.pitest.mutationtest.engine.gregor.blocks.BlockTrackingMethodDecorator.visitEnd(BlockTrackingMethodDecorator.java:58)
        at org.pitest.reloc.asm.ClassReader.readMethod(ClassReader.java:1496)
        at org.pitest.reloc.asm.ClassReader.accept(ClassReader.java:717)
        at org.pitest.reloc.asm.ClassReader.accept(ClassReader.java:401)
        at org.pitest.mutationtest.engine.gregor.GregorMutater.getMutation(GregorMutater.java:106)
        at org.pitest.mutationtest.build.intercept.timeout.InfiniteLoopFilter.isInfiniteLoop(InfiniteLoopFilter.java:81)
        at org.pitest.mutationtest.build.intercept.timeout.InfiniteLoopFilter.findTimeoutMutants(InfiniteLoopFilter.java:72)
        at org.pitest.mutationtest.build.intercept.timeout.InfiniteLoopFilter.intercept(InfiniteLoopFilter.java:49)
        at org.pitest.mutationtest.build.CompoundMutationInterceptor.intercept(CompoundMutationInterceptor.java:38)
        at org.pitest.mutationtest.build.MutationSource.createMutations(MutationSource.java:65)
        at org.pitest.mutationtest.build.MutationTestBuilder.lambda$classToMutations$1(MutationTestBuilder.java:94)
        at org.pitest.functional.FCollection.flatMapTo(FCollection.java:58)
        at org.pitest.functional.FCollection.flatMap(FCollection.java:68)
        at org.pitest.mutationtest.build.MutationTestBuilder.createMutationTestUnits(MutationTestBuilder.java:58)
        at org.pitest.mutationtest.tooling.MutationCoverage.buildMutationTests(MutationCoverage.java:281)
        at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:135)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:120)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:50)
        at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:87)
        at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)
        at org.pitest.pitclipse.runner.PitRunner.lambda$1(PitRunner.java:59)
        at com.google.common.base.Present.transform(Present.java:75)
        at org.pitest.pitclipse.runner.PitRunner.main(PitRunner.java:46)

Here is a picture of the error:

enter image description here

Any suggestion for solving it? Where can I find a jar file that has java.awt.GradientPaint?

1

There are 1 best solutions below

0
On

Downgrade the Java version to Java SE 1.6 in Properties of "JRE system library" of your project and it should work on even the latest version of eclipse.