-
Notifications
You must be signed in to change notification settings - Fork 193
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
java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText #3489
Comments
@rgrunber this is due to jgit registering a shutdownhook but never unregister it, then when it is finally executed (maven build terminates) "something" went wrong but the text can't be loaded as the classloader is gone, so this is actually leaking. i have already described it here in more details: so unless there is a fix in JGit and a new release there is sadly nothing much we can do about it. |
Thanks for the reference. Feel free to close unless you'd rather track it. |
@laeubi is there an issue open to JGit about the root bug? |
Not that I'm aware of, JGit wants me to fill a huge Issue template and last time I tried to contribute said they are not using Github for contributions so I kind of gave up on this. I really don't want this old Bugzilla/Gerrit "feeling" back ;-) But if you like you can open one and then link it here. |
I submitted eclipse-jgit/jgit#36 to JGit. |
@mickaelistria it seems now we have the text printed, but jgit now just fails earlier: |
It's probably even worse ;) |
As this more seem to originate from Maven I think no... I initially assumed it was a problem with the internal OSGi framework but think its more generally a problem when the classloader is disposed as @tomaswolf explained here, in general a Shutdownhook must be used with care and I think JGit is using them wrong as described at https://docs.oracle.com/javase/8/docs/technotes/guides/lang/hook-design.html one should simply cancel a hook when it is no longer needed instead of it lingering around forever. |
Is it already possible to leverage the JGit fix in Tycho? |
If it is released to maven central somewhere (or a snapshot repo) it should be possible to add an additional |
The JGit snapshot maven repo is https://repo.eclipse.org/content/repositories/jgit-snapshots . |
The JGit bug fix is available in 6.10.0, released last month. |
I recently started seeing the following error in our Maven builds that use Tycho. There's not much info in the stacktrace and I couldn't find any references to
JGitText
in Tycho, so I thought it might have been a Jenkins plugin issue, but I see the error in GitHub Actions also. It doesn't appear to be harmful.https://github.com/redhat-developer/vscode-java/actions/runs/7708013160
We run builds on every new change, and the first one from last week where this started happening was on the bump from 4.0.4 to 4.0.5.
I've seen it in JDT UI main builds : https://ci.eclipse.org/jdt/job/eclipse.jdt.ui-github/job/master/12/console
However, there's also similar builds of the same project on Jenkins where the issue doesn't occur : https://ci.eclipse.org/ls/job/jdt-ls-master/1956/console
The text was updated successfully, but these errors were encountered: