Gradle not working anymore


(Joe) #1

Hi, I’m having problems with gradle… I’ve been using gradle for months now and everything was fine. Since yesterday no gradle call works anymore. I can’t think of anything i changend on my system that could have an impact on gradle.

I can’t even call gradle -v.

$ gradle -v
  FAILURE: Build aborted because of an internal error.
  * What went wrong:
Build aborted because of an unexpected internal error. Please file an issue at:
http://forums.gradle.org.
  * Try:
Run with --debug option to get additional debug info.
  * Exception is:
java.lang.NoSuchMethodError: org.slf4j.MarkerFactory.getDetachedMarker(Ljava/lan
g/String;)Lorg/slf4j/Marker;
        at org.gradle.api.logging.Logging.<clinit>(Logging.java:34)
        at org.gradle.logging.internal.TerminalDetectorFactory.<clinit>(Terminal
DetectorFactory.java:33)
        at org.gradle.logging.LoggingServiceRegistry.createOutputEventRenderer(L
oggingServiceRegistry.java:127)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.gradle.internal.service.DefaultServiceRegistry.invoke(DefaultServ
iceRegistry.java:179)
        at org.gradle.internal.service.DefaultServiceRegistry.access$300(Default
ServiceRegistry.java:47)
        at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodServi
ce.create(DefaultServiceRegistry.java:340)
        at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectProvi
der.getInstance(DefaultServiceRegistry.java:244)
        at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.g
etService(DefaultServiceRegistry.java:279)
        at org.gradle.internal.service.DefaultServiceRegistry$OwnServices.getSer
vice(DefaultServiceRegistry.java:219)
        at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultService
Registry.java:145)
        at org.gradle.logging.LoggingServiceRegistry.<init>(LoggingServiceRegist
ry.java:46)
        at org.gradle.logging.LoggingServiceRegistry.newCommandLineProcessLoggin
g(LoggingServiceRegistry.java:53)
        at org.gradle.launcher.cli.CommandLineActionFactory.createLoggingService
s(CommandLineActionFactory.java:74)
        at org.gradle.launcher.cli.CommandLineActionFactory.convert(CommandLineA
ctionFactory.java:54)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.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(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
50)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)

I checked the lib/ext folder in my jdk for a different version of a slf4j.jar but there is none.

My System: Win7 64bit, jdk 1.6.0_30 I tried using the latest gradle-version (1.3) and also jdk 1.7.0_05 but i get the same error.

Any ideas?

Best regards Johannes.


(Tye Howard) #2

Is slf4j-api-1.6.6.jar in your gradle-1.3/lib directory? Also you should probably run the 1.3 gradle explicitly as it sounds like you are having environment issues.


(Alan Thompson) #3

On my system (Win 7/Cygwin):

date ; gradle --version

Thu, Jan 03, 2013 9:49:53 AM


Gradle 1.3


Gradle build time: Tuesday, November 20, 2012 11:37:38 AM UTC

Groovy: 1.8.6

Ant: Apache Ant™ version 1.8.4 compiled on May 22 2012

Ivy: 2.2.0

JVM: 1.7.0_09 (Oracle Corporation 23.5-b02)

OS: Windows 7 6.1 amd64

Check your environment variables for the usual suspects (JAVA_HOME, GROOVY_HOME, GRADLE_HOME), and make sure that the */bin of all the above are ate the beginning of your PATH env var. If nothing jumps out, perhaps a delete & reinstall of all the above will fix whatever is missing.

Alan Thompson


(Alan Thompson) #4

Oops - it looks like markdown turned my underscores into italics (need to escape them when submitting). Obviously, I tried to type JAVA_HOME, GROOVY_HOME, and GRADLE_HOME.


(Joe) #5

Hi Alan, hi Tye thanks for your replies.

@Tye The .jar is in the /lib folder. What do u mean with “run gradle explicitly”?

I checked and rewrote the JAVA_HOME/GRADLE_HOME PATH but nothing changed.

I’m not sure what PATH I should use for GROOVY_HOME?

I’m developing with eclipse…therefore i installed the gradle-plugin and this seems to work just fine. I use the same gradle-Installpath for this plugin.


(Tye Howard) #6

If your 1.3 gradle is in “c:\somedirectory\dists\gradle-1.3”, then execute “c:\somedirectory\dists\gradle-1.3\bin\gradle” not just “gradle”. If the explicit call works, then there is something wrong with your PATH environment variable.

If the explicit call doesn’t work, then it could be either the JAVA_HOME variable or the gradle installation itself.


(Joe) #7

If I navigate to my gradle installation and excecute “gradle -v” it works. When I navigate to my Project and excecute “c:…\bin\gradle” I get the same error. So the installation for itself works. The JAVA_HOME Path works as well, because I can excecute “java -version”. GRADLE_HOME ist also correct… I wouldn’t get this type of error If gradle wouldn’t be found, right?

Which Paths are there else to check?


(Joe) #8

I was able to fix it… The problem was the jdk. On my windows Path my JAVA_HOME was pointing on JDK_1.7. The problem was that i was using msysgit and in its “own environment” the JAVA_HOME Path was pointing to JDK_1.6. So i changed it there to 1.7 and gradle was alive again. Its more likely a workaround since I still don’t know why its not working with JDK_1.6 but i can live with that.

Thanks for your support guys.


(Peter Walker) #9

Good luck.