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

File / New / Bnd Osgi Workspace: NoClassDefFoundException javax/net/ssl/SSLContext in GitCloneTemplate.generateOutputs() in Git git = cloneCmd.call(); #5911

Closed
chrisrueger opened this issue Nov 30, 2023 · 2 comments · Fixed by #5915

Comments

@chrisrueger
Copy link
Contributor

Eclipse SDK
Version: 2022-09 (4.25)
Build id: I20220831-1800
Java 17.0.9

while working on the templates today I discovered an error when I wanted to create a Bnd Workspace via a workspace template on github.

  1. File / New / Bnd Osgi Workspace
image
  1. Choose one of the existing ones (also my own didn't work)
image
  1. Error on next page
image

The error only happened in the Eclipse instance I started from the Eclipse instance containing the bndtools workspace.

It works fine when I do it with my normal Eclipse where I am developing for bndtools (Eclipse 2023-09)

Debugging

  • I happens in org.bndtools.templating.jgit.GitCloneTemplate.generateOutputs(Map<String, List<Object>>, IProgressMonitor)
image image

What did I want to do

I actually wanted to test #5907 with the update template in
bndtools/bndtools.workspace.min#11 and bndtools/workspace#24

@pkriens
Copy link
Member

pkriens commented Dec 1, 2023

can you show a stack trace?

@chrisrueger
Copy link
Contributor Author

@pkriens here is one. I needed to modify the code because it is currently swallowed.

image
g! 2023-12-01 14:09:14,238 [HttpClient,https://api.github.com/repos/bndtools/workspace] INFO  a.bnd.build.LoggingProgressPlugin - Download https://api.github.com/repos/bndtools/workspace
2023-12-01 14:09:14,471 [HttpClient,https://api.github.com/repos/bndtools/bndtools.workspace.min] INFO  a.bnd.build.LoggingProgressPlugin - Download https://api.github.com/repos/bndtools/bndtools.workspace.min
java.lang.NoClassDefFoundError: javax/net/ssl/SSLContext
	at org.eclipse.jgit.transport.http.apache.HttpClientConnectionFactory$HttpClientSession.configure(HttpClientConnectionFactory.java:79)
	at org.eclipse.jgit.transport.http.apache.HttpClientConnectionFactory$HttpClientSession.configure(HttpClientConnectionFactory.java:1)
	at org.eclipse.jgit.transport.TransportHttp.httpOpen(TransportHttp.java:1049)
	at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:642)
	at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:465)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:151)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:103)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1405)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:233)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:325)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:191)
	at org.bndtools.templating.jgit.GitCloneTemplate.generateOutputs(GitCloneTemplate.java:122)
	at bndtools.wizards.workspace.WorkspacePreviewPage.lambda$1(WorkspacePreviewPage.java:144)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.ClassNotFoundException: javax.net.ssl.SSLContext cannot be found by org.eclipse.jgit.http.apache_6.3.0.202209071007-r
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 14 more

pkriens added a commit to pkriens/bnd that referenced this issue Dec 1, 2023
Eclipse seems to use boot delegation for javax.*. Since
we're not doing this in our debug setup, we get errors.
This patch just does the same brain damaged thing
Eclipse is doing to mitigate even brain deader
bundles. Yes, I am frustrated, bnd fixed this problem
20 years ago!
Fixes bndtools#5911

---
 Signed-off-by: Peter Kriens <[email protected]>

Signed-off-by: Peter Kriens <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants