Community
Participate
Working Groups
Created attachment 287430 [details] capture The corresponding error occurs when using the pull command of jgit within the osgi bundle. ======================================================================== java.lang.NoClassDefFoundError: javax/management/MalformedObjectNameException at org.eclipse.jgit.internal.storage.file.WindowCache.publishMBeanIfNeeded(WindowCache.java:485) ... (check attachment) ======================================================================== As a result of the inspection, it seems that the jgit bundle failed to import the javax.management package. When I wrote the javax.management package in the jgit's manifest file in import-package, I confirmed that it worked normally. Please check this bug. thank you
Which java version do you use ? Do you run jgit in an OSGi runtime or using plain Java ? If you run jgit on Java 9 or later you may need to add a dependency to your application to the javax.management module.
Using OSGi, We also get this problem with jgit version 6.2.0.202206071550-r: SEVERE [org.openide.util.Exceptions] java.lang.ClassNotFoundException: javax.management.MalformedObjectNameException not found by org.eclipse.jgit [52] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1585) at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1970) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) Caused: java.lang.NoClassDefFoundError: javax/management/MalformedObjectNameException at org.eclipse.jgit.internal.storage.file.WindowCache.publishMBeanIfNeeded(WindowCache.java:485) at org.eclipse.jgit.internal.storage.file.WindowCache.get(WindowCache.java:386) at org.eclipse.jgit.internal.storage.file.WindowCursor.pin(WindowCursor.java:327) at org.eclipse.jgit.internal.storage.file.WindowCursor.copy(WindowCursor.java:226) at org.eclipse.jgit.internal.storage.file.Pack.readFully(Pack.java:602) at org.eclipse.jgit.internal.storage.file.Pack.load(Pack.java:785) at org.eclipse.jgit.internal.storage.file.Pack.get(Pack.java:273) at org.eclipse.jgit.internal.storage.file.PackDirectory.open(PackDirectory.java:212) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedObject(ObjectDirectory.java:404) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openPackedFromSelfOrAlternate(ObjectDirectory.java:368) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObjectWithoutRestoring(ObjectDirectory.java:359) at org.eclipse.jgit.internal.storage.file.ObjectDirectory.openObject(ObjectDirectory.java:344) at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:132) at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:214) at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:1086) at org.eclipse.jgit.internal.storage.file.PackedBatchRefUpdate.checkObjectExistence(PackedBatchRefUpdate.java:253) at org.eclipse.jgit.internal.storage.file.PackedBatchRefUpdate.execute(PackedBatchRefUpdate.java:136) at org.eclipse.jgit.lib.BatchRefUpdate.execute(BatchRefUpdate.java:582) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:242) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:103) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1321) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:213) at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:311) at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:182)
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/194234
(In reply to Eclipse Genie from comment #3) > New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/194234 fix for stable-5.13
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/194235
(In reply to Eclipse Genie from comment #5) > New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/194235 Abandoned.
Gerrit change https://git.eclipse.org/r/c/jgit/jgit/+/194234 was merged to [stable-5.13]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=f4cbf31ae4350f5df0f54401ba10fb9b84ec31e2