Opened 5 years ago
Closed 3 years ago
#58501 closed defect (worksforme)
Gradle-5.4.1 does not even start
Reported by: | mouse07410 (Mouse) | Owned by: | amake (Aaron Madlon-Kay) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | gradle |
Description
MacOS Mojave 10.14.4, Oracle JDK-1.8.0_211, Xcode-10.2.1, current Macports and current stable Gradle port 5.4.1 (current groovy
port installed).
Problem: installation appears fine, but even the simplest invocation fails. I suspect pilot's error rather than software bug, but help would be greatly appreciated:
$ sudo port install gradle ---> Fetching archive for gradle ---> Attempting to fetch gradle-5.4.1_0.darwin_18.noarch.tbz2 from https://packages.macports.org/gradle ---> Attempting to fetch gradle-5.4.1_0.darwin_18.noarch.tbz2.rmd160 from https://packages.macports.org/gradle ---> Installing gradle @5.4.1_0 ---> Activating gradle @5.4.1_0 ---> Cleaning gradle ---> Updating database of binaries ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. $ gradle --version [main] INFO org.gradle.internal.nativeintegration.services.NativeServices - Initialized native services in: /Users/ur20980/.gradle/native FAILURE: Build failed with an exception. * What went wrong: org.slf4j.impl.SimpleLogger cannot be cast to org.gradle.api.logging.Logger * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org $ java -version java version "1.8.0_211" Java(TM) SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode) $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/Current/Contents/Home $ echo $GRADLE_HOME /opt/local/share/java/gradle $ ll /Library/Java/Extensions/slf4j*.jar -rw-r--r-- 1 root wheel 41203 May 20 10:58 /Library/Java/Extensions/slf4j-api-1.7.25.jar -rw-r--r-- 1 root wheel 15257 May 20 15:53 /Library/Java/Extensions/slf4j-simple-1.7.25.jar $
Invoking with extra flags --stacktrace
or --debug
did not add anything to the above output.
Again, your help figuring out what seems wrong with the configuration and how to straighten it up would be appreciated!
Change History (5)
comment:1 Changed 5 years ago by amake (Aaron Madlon-Kay)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 5 years ago by mouse07410 (Mouse)
No, it is not a duplicate. And it fails this way when invoked from *any* directory, including the project where I tried to use it.
Don't invoke from
~
Sorry, irrelevant and does not help.
What did help/fix this problem was
- making sure there is no SLF4J jars on the classpath, and
- making sure there is LOG4J on the classpath, including
log4j.properties
Here's the result of invoking gradle
in ~
(for those who don't think it should work):
$ pwd /Users/ur20980 $ gradle --version ------------------------------------------------------------ Gradle 5.4.1 ------------------------------------------------------------ Build time: 2019-04-26 08:14:42 UTC Revision: 261d171646b36a6a28d5a19a69676cd098a4c19d Kotlin: 1.3.21 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018 JVM: 1.8.0_211 (Oracle Corporation 25.211-b12) OS: Mac OS X 10.14.4 x86_64 $
Coincidentally, it now works with the project as well.
This probably should be documented somewhere, because (at least to me) the need to make LOG4J available on the classpath and to remove SLF4J from the classpath was non-obvious.
P.S. Re-opening to request the "duplicate" comment removed, and to ensure this explanation is actually read. Because that shooting-from-the-hip closing of the ticket is not right.
comment:3 Changed 5 years ago by mouse07410 (Mouse)
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:4 Changed 5 years ago by jmroot (Joshua Root)
Cc: | amake@… removed |
---|---|
Owner: | set to amake |
Status: | reopened → assigned |
comment:5 Changed 3 years ago by amake (Aaron Madlon-Kay)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
It sounds like this was a configuration error on the user's part.
I have never been able to reproduce this, and in the meantime Gradle has changed a lot.
I will close. Feel free to reopen if it's still reproducible.
Duplicate of #56768. Don't invoke from
~
.