Getting IncompatibleClassChangeError on Windows Vista with gradle 1.2


(puschteblume) #1

Is there anybody who also reports this problem? Gradle 1.1 is working fine, but 1.2 reports the following problem:

java.lang.IncompatibleClassChangeError: Found interface org.objectweb.asm.MethodVisitor

12:18:04.265 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@ac6a45, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@175078b, org.gradle.logging.internal.JavaUtilLoggingConfigurer@42552c] 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] Could not generate a proxy class for class org.gradle.invocation.DefaultGradle. 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleException: Could not generate a proxy class for class org.gradle.invocation.DefaultGradle. 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:187) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.initialization.DefaultGradleLauncherFactory.doNewInstance(DefaultGradleLauncherFactory.java:127) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:99) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:46) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:38) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:200) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.Main.doAction(Main.java:48) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.Main.main(Main.java:39) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) 12:18:04.452 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.launcher.GradleMain.main(GradleMain.java:26) 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.IncompatibleClassChangeError: Found interface org.objectweb.asm.MethodVisitor, but class was expected 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.addGetter(AsmBackedClassGenerator.java:470) 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.addGetter(AsmBackedClassGenerator.java:464) 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.mixInDynamicAware(AsmBackedClassGenerator.java:276) 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]

at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:72) 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]

… 21 more 12:18:04.468 [ERROR] [org.gradle.BuildExceptionReporter]


(Peter Niederwieser) #2

Can you post the full stack trace (’-S’) and the command you are issuing? Have you done a clean build after switching to 1.2?

PS: Please use HTML ‘code’ tags for stack traces and the like.


(puschteblume) #3

Salü Peter Thanks for your answer. I can’t do a clean. Doing gradle -clean results in this exception.

Here ist the output of gradle -S:

org.gradle.api.GradleException: Could not generate a proxy class for class org.gradle.invocation.DefaultGradle.
        at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:187)
        at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
        at org.gradle.initialization.DefaultGradleLauncherFactory.doNewInstance(DefaultGradleLauncherFactory.java:127)
        at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:99)
        at org.gradle.initialization.DefaultGradleLauncherFactory.newInstance(DefaultGradleLauncherFactory.java:46)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:38)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:200)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: java.lang.IncompatibleClassChangeError: Found interface org.objectweb.asm.MethodVisitor, but class was expected
        at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.addGetter(AsmBackedClassGenerator.java:470)
        at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.addGetter(AsmBackedClassGenerator.java:464)
        at org.gradle.api.internal.AsmBackedClassGenerator$ClassBuilderImpl.mixInDynamicAware(AsmBackedClassGenerator.java:276)
        at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:72)
        ... 25 more

(Luke Daley) #4

Heiko,

You’ve somehow got a version of the ASM library on Gradle’s classpath other than the one Gradle ships.

This is happening very early in the Gradle lifecycle so I’m not sure how this could be happening. Have you customised the Gradle distribution in any way?

Try deleting the ‘build’ and ‘.gradle’ directories in your project.


(puschteblume) #5

Hi Luke and Peter After installing the jvm to version 1.7.0.07 (before I used 1.6.0.30) it works fine. I don’t know what has happened here. The ASM is nowhere in the jdk included. Changing the system path to 1.6.0.30 back works also. I can’t figure out what the problem was. Thanks, for the help.


(Luke Daley) #6

I suspect this was just a caching issue. There are some issues that we know of that means stuff can bleed through when upgrading Gradle versions.

Flipping JDKs would have forced a full recompile of everything.

I’m glad your issue is resolved.


(Sazzadur Rahaman) #7

Still I am getting the same problem with gradle 2.0 JVM 1.2.0_51 Windows 7 6.1


(Peter Niederwieser) #8

JVM 1.2.0_51? What is this? Have you tried to reinstall the JDK (1.6 or higher) to rule out a contaminated JDK installation?


(Sazzadur Rahaman) #9

Sorry JVM was 1.7.0_51. The problem has been solved after reinstallation of JDK. This Thread is very useful!