On 05/04/2011, at 7:09 PM, John Smart wrote: > Hi, > > I've installed Gradle in the recommended way, but am getting an exception > whenever I run Gradle: > > $ echo $GRADLE_HOME > /Library/Gradle/current > $ which gradle > /Library/Gradle/current/bin/gradle > $ gradle -v --debug > > 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://www.gradle.org. > > * Try: > Run with --debug option to get additional debug info. > > * Exception is: > java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be > cast to ch.qos.logback.classic.LoggerContext
It looks like slf4j-log4j.jar is ending up on the classpath used to launch Gradle, conflicting with logback-classic.jar. If you haven't added anything to the Gradle distribution's lib directory, then the jar might be coming from something in the environment. Some options: * Via the $GRADLE_OPTS or $JAVA_OPTS environment variables * In $JAVA_HOME/lib/ext * Using a non-standard 'java' launcher in $JAVA_HOME/bin Which jvm are you using? And which version of Gradle did you install? -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
