Skip to content
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

PDE verification build fails with java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText #1020

Closed
vogella opened this issue Dec 19, 2023 · 1 comment

Comments

@vogella
Copy link
Contributor

vogella commented Dec 19, 2023

See https://github.com/eclipse-pde/eclipse.pde/actions/runs/7263610468/job/19789307909?pr=871 this seems to happen regulary but not always:

Error: After correcting the problems, you can resume the build with the command
Error: mvn -rf :org.eclipse.pde.ui.tests
Error: Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText
at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:85)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jgit.internal.JGitText

@laeubi
Copy link
Contributor

laeubi commented Dec 19, 2023

This seems to be a bad ShutdownHook that is executed when the bundle classlaoder is already disposed here

	private void cleanup() {
		shutdownInProgress = true;
		ExecutorService runner = Executors.newWorkStealingPool();
		try {
			runner.submit(() -> {
				this.doCleanup();
				return null;
			}).get(30L, TimeUnit.SECONDS);
		} catch (RejectedExecutionException | InterruptedException
				| ExecutionException | TimeoutException e) {
			LOG.error(JGitText.get().shutdownCleanupFailed, e);
		}
		runner.shutdownNow();
	
}

the problem is that the hook is always registered even if the bundle is stopped, that is most likely wrong, I don't see how a shutdown hook of that kind makes any sense inside an OSGi framework, JGit should check if it is running in an OSGi framework and then use a BundleListener or similar instead, there is nothing PDE can do here so please report that to jgit, once this is fixed and released tycho can be updated and the error will go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants