Bug 1228138

Summary: jgit daemon fails with java.lang.NoClassDefFoundError
Product: [Fedora] Fedora Reporter: Thomas Meyer <thomas.mey>
Component: eclipse-jgitAssignee: Mat Booth <mat.booth>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: andjrobins, eclipse-sig, jerboaa, krzysztof.daniel, mat.booth, peljasz, rgrunber
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: eclipse-jgit-4.1.0-6.fc23 eclipse-jgit-4.1.0-6.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 20:28:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Meyer 2015-06-04 09:53:00 UTC
Description of problem:

Starting a jgit daemon with

$ jgit daemon /var/lib/git
Exporting /var/lib/git
Listening on 0.0.0.0/0.0.0.0:9418
Exception in thread "Git-Daemon-Client /192.168.4.151:36650" java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.util.FS
	at org.eclipse.jgit.transport.resolver.FileResolver.open(FileResolver.java:106)
	at org.eclipse.jgit.transport.Daemon.openRepository(Daemon.java:383)
	at org.eclipse.jgit.transport.DaemonService.execute(DaemonService.java:135)
	at org.eclipse.jgit.transport.DaemonClient.execute(DaemonClient.java:116)
	at org.eclipse.jgit.transport.Daemon$6.run(Daemon.java:339)

Server is 192.168.4.150
Client is 192.168.4.151

client does:
$ git clone git://192.168.4.150/linux.git

jgit 3.6.0 from Maven central works as expected.

Version-Release number of selected component (if applicable):

Name        : jgit
Arch        : noarch
Epoch       : 0
Version     : 3.7.0
Release     : 2.fc22
Größe       : 2.3 M
Paketquelle : @System
Zusammenfas : Java-based command line Git interface
URL         : http://www.eclipse.org/egit/
Lizenz      : BSD
Beschreibun : Command line Git tool built entirely in Java.


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Mat Booth 2015-06-04 10:37:30 UTC
Hi, this is probably incomplete classpath in the script.

Please try editing your /usr/bin/jgit script and changing the "export JGIT_CLASSPATH" line to the following:

export JGIT_CLASSPATH="$(build-classpath jgit slf4j args4j jsch commons-compress xz-java javaewah)"

And see if that fixes the problem for you.

Comment 2 Thomas Meyer 2015-06-05 20:48:30 UTC
I replaced the export line with:

export JGIT_CLASSPATH="$(build-classpath jgit log4j slf4j args4j jsch commons-compress xz-java javaewah)"

and I still get:

$ jgit daemon /var/lib/git
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/share/java/slf4j/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/share/java/slf4j/slf4j-nop.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/share/java/slf4j/slf4j-simple.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Exporting /var/lib/git
Listening on 0.0.0.0/0.0.0.0:9418
Exception in thread "Git-Daemon-Client /192.168.4.151:36663" java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.util.FS
	at org.eclipse.jgit.transport.resolver.FileResolver.open(FileResolver.java:106)
	at org.eclipse.jgit.transport.Daemon.openRepository(Daemon.java:383)
	at org.eclipse.jgit.transport.DaemonService.execute(DaemonService.java:135)
	at org.eclipse.jgit.transport.DaemonClient.execute(DaemonClient.java:116)
	at org.eclipse.jgit.transport.Daemon$6.run(Daemon.java:339)

Comment 3 Fedora Update System 2015-11-29 15:10:06 UTC
eclipse-jgit-4.1.0-6.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-ee69124ca6

Comment 4 Fedora Update System 2015-11-29 15:10:06 UTC
eclipse-jgit-4.1.0-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-4abd9cce77

Comment 5 Fedora Update System 2015-11-29 22:20:34 UTC
eclipse-jgit-4.1.0-6.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update eclipse-jgit'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-ee69124ca6

Comment 6 Fedora Update System 2015-11-29 23:52:43 UTC
eclipse-jgit-4.1.0-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update eclipse-jgit'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-4abd9cce77

Comment 7 Fedora Update System 2015-12-07 20:28:45 UTC
eclipse-jgit-4.1.0-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-12-07 21:21:01 UTC
eclipse-jgit-4.1.0-6.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 lejeczek 2016-06-30 08:58:11 UTC
on f24 I do:
$ sudo jgit daemon /var/lib/git

and get:

java.lang.IllegalStateException: Cannot set value to a final field 'org.eclipse.jgit.pgm.Daemon.enable'.
	at org.kohsuke.args4j.spi.Setters.create(Setters.java:32)
	at org.kohsuke.args4j.ClassParser.parse(ClassParser.java:34)
	at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:94)
	at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:69)
	at org.eclipse.jgit.pgm.opt.CmdLineParser.<init>(CmdLineParser.java:132)
	at org.eclipse.jgit.pgm.opt.CmdLineParser.<init>(CmdLineParser.java:115)
	at org.eclipse.jgit.pgm.TextBuiltin.parseArguments(TextBuiltin.java:214)
	at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:198)
	at org.eclipse.jgit.pgm.Main.execute(Main.java:246)
	at org.eclipse.jgit.pgm.Main.run(Main.java:138)
	at org.eclipse.jgit.pgm.Main.main(Main.java:110)