-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jgit jar mystery NoClassDefFoundError #408
Comments
The output from jbang incl. full command line: jbang --verbose org.eclipse.jgit:org.eclipse.jgit.pgm:5.9.0.202009080501-r
[jbang] Resolving dependencies...
[jbang] Resolving org.eclipse.jgit:org.eclipse.jgit.pgm:5.9.0.202009080501-r...Done
[jbang] Dependencies resolved
[jbang] System Java version detected as 11
[jbang] System Java version matches requested version 11
[jbang] run: /Users/max/.sdkman/candidates/java/current/bin/java -classpath /Users/max/.m2/repository/args4j/args4j/2.33/args4j-2.33.jar:/Users/max/.m2/repository/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.archive/5.9.0.202009080501-r/org.eclipse.jgit.archive-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit/5.9.0.202009080501-r/org.eclipse.jgit-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/com/googlecode/javaewah/JavaEWAH/1.1.7/JavaEWAH-1.1.7.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.ui/5.9.0.202009080501-r/org.eclipse.jgit.ui-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.gpg.bc/5.9.0.202009080501-r/org.eclipse.jgit.gpg.bc-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/bouncycastle/bcpg-jdk15on/1.65/bcpg-jdk15on-1.65.jar:/Users/max/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.65.01/bcprov-jdk15on-1.65.01.jar:/Users/max/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.65/bcpkix-jdk15on-1.65.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.http.apache/5.9.0.202009080501-r/org.eclipse.jgit.http.apache-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.ssh.apache/5.9.0.202009080501-r/org.eclipse.jgit.ssh.apache-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-osgi/2.4.0/sshd-osgi-2.4.0.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-sftp/2.4.0/sshd-sftp-2.4.0.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-core/2.4.0/sshd-core-2.4.0.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-common/2.4.0/sshd-common-2.4.0.jar:/Users/max/.m2/repository/net/i2p/crypto/eddsa/0.3.0/eddsa-0.3.0.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.ssh.jsch/5.9.0.202009080501-r/org.eclipse.jgit.ssh.jsch-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar:/Users/max/.m2/repository/com/jcraft/jzlib/1.1.1/jzlib-1.1.1.jar:/Users/max/.m2/repository/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar:/Users/max/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/max/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/max/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar:/Users/max/.m2/repository/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.jar:/Users/max/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.30.v20200611/jetty-servlet-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-security/9.4.30.v20200611/jetty-security-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-server/9.4.30.v20200611/jetty-server-9.4.30.v20200611.jar:/Users/max/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-http/9.4.30.v20200611/jetty-http-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-util/9.4.30.v20200611/jetty-util-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-io/9.4.30.v20200611/jetty-io-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.lfs/5.9.0.202009080501-r/org.eclipse.jgit.lfs-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/com/google/code/gson/gson/2.8.2/gson-2.8.2.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.lfs.server/5.9.0.202009080501-r/org.eclipse.jgit.lfs.server-5.9.0.202009080501-r.jar -jar /Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.pgm/5.9.0.202009080501-r/org.eclipse.jgit.pgm-5.9.0.202009080501-r.jar
Error: Unable to initialize main class org.eclipse.jgit.pgm.Main
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jgit/transport/http/HttpConnectionFactory jbang --verbose jgit.java
[jbang] System Java version detected as 11
[jbang] System Java version matches requested version 11
[jbang] run: /Users/max/.sdkman/candidates/java/current/bin/java -classpath /Users/max/.jbang/cache/jars/jgit.java.061d3c9c950bc38a317143e90b806c87ac95de7e7c01fd0ff16633385698cd32.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.pgm/5.9.0.202009080501-r/org.eclipse.jgit.pgm-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/args4j/args4j/2.33/args4j-2.33.jar:/Users/max/.m2/repository/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.archive/5.9.0.202009080501-r/org.eclipse.jgit.archive-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit/5.9.0.202009080501-r/org.eclipse.jgit-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/com/googlecode/javaewah/JavaEWAH/1.1.7/JavaEWAH-1.1.7.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.ui/5.9.0.202009080501-r/org.eclipse.jgit.ui-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.gpg.bc/5.9.0.202009080501-r/org.eclipse.jgit.gpg.bc-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/bouncycastle/bcpg-jdk15on/1.65/bcpg-jdk15on-1.65.jar:/Users/max/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.65.01/bcprov-jdk15on-1.65.01.jar:/Users/max/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.65/bcpkix-jdk15on-1.65.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.http.apache/5.9.0.202009080501-r/org.eclipse.jgit.http.apache-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/apache/httpcomponents/httpcore/4.4.12/httpcore-4.4.12.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.ssh.apache/5.9.0.202009080501-r/org.eclipse.jgit.ssh.apache-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-osgi/2.4.0/sshd-osgi-2.4.0.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-sftp/2.4.0/sshd-sftp-2.4.0.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-core/2.4.0/sshd-core-2.4.0.jar:/Users/max/.m2/repository/org/apache/sshd/sshd-common/2.4.0/sshd-common-2.4.0.jar:/Users/max/.m2/repository/net/i2p/crypto/eddsa/0.3.0/eddsa-0.3.0.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.ssh.jsch/5.9.0.202009080501-r/org.eclipse.jgit.ssh.jsch-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/com/jcraft/jsch/0.1.55/jsch-0.1.55.jar:/Users/max/.m2/repository/com/jcraft/jzlib/1.1.1/jzlib-1.1.1.jar:/Users/max/.m2/repository/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar:/Users/max/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/max/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/max/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar:/Users/max/.m2/repository/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.jar:/Users/max/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.30.v20200611/jetty-servlet-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-security/9.4.30.v20200611/jetty-security-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-server/9.4.30.v20200611/jetty-server-9.4.30.v20200611.jar:/Users/max/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-http/9.4.30.v20200611/jetty-http-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-util/9.4.30.v20200611/jetty-util-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jetty/jetty-io/9.4.30.v20200611/jetty-io-9.4.30.v20200611.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.lfs/5.9.0.202009080501-r/org.eclipse.jgit.lfs-5.9.0.202009080501-r.jar:/Users/max/.m2/repository/com/google/code/gson/gson/2.8.2/gson-2.8.2.jar:/Users/max/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.lfs.server/5.9.0.202009080501-r/org.eclipse.jgit.lfs.server-5.9.0.202009080501-r.jar jgit
jgit --git-dir GIT_DIR --help (-h) --show-stack-trace --version command [ARG ...]
The most commonly used commands are:
add Add file contents to the index
archive Zip up files from the named tree
...
... |
https://twitter.com/alblue/status/1314350114736148480 reminded me of why this fails |
this was fixed in recent releases. no longer uses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't explain this one so recording it for posperity:
this fails:
jbang org.eclipse.jgit:org.eclipse.jgit.pgm:5.9.0.202009080501-r
but doing this works:
that should technically work the exact same....
When run with verbose you see the only difference is that the first one launch via
--jar
where as second one is with main class specified.but otherwise exact same classpath.
I tried removing the duplicate presence of pgm.jgit jar but gave same result.
The text was updated successfully, but these errors were encountered: