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

Workspace template fails to read files from github in some Eclipse configurations #6431

Open
scottslewis opened this issue Jan 19, 2025 · 0 comments

Comments

@scottslewis
Copy link
Contributor

I'm opening this bug here (even though I think the root cause is in egit or other Eclipse projects) because the problem shows up for bndtools 7.1 users that install bndtools 7.1 into eclipse packages or the SDK with git installed.

When creating a new workspace via File->New->Bnd OSGi Workspace

Image

Image

In environments with egit/jgit installed the following error occurs in Preview Changes

Image

Note that the first time, the Preview Page contents are empty with no error message as shown in the previous screenshot, but if the Preview Page will be empty but the shown error message will be present.

Error: Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory is not from bndtools code, but I believe it's from jgit's usage of apache httpclient 4.5...see below.

Nothing (e.g. stack) is reported to the Eclipse Error view or osgi log. I suspect the reason for this is that in the WorkspacePreviewPage class:

The Exception message is not getting logged and only sets the errorMessage. It would be helpful for debugging this if the Exception caught in WorkspacePreviewPage logged the exception and stack trace.

With configuration...

OS: Windows/x64
Java version: 17

  1. The Eclipse Committers package for 2024-12 from: https://www.eclipse.org/downloads/packages/release/2024-12/r/eclipse-ide-eclipse-committers
  2. Bndtools 7.1 from https://bndtools.org/bndtools.p2.repo/7.1.0/
  3. ECF 3.15.3 from https://download.eclipse.org/rt/ecf/3.15.3/site.p2

...the problem described above occurs.

While with the Eclipse SDK as base...i.e.

  1. Eclipse 4.34/2024-12 SDK as base...i.e. download here: https://download.eclipse.org/eclipse/downloads/drops4/R-4.34-202411201800/
  2. Eclipse EGit 7.1.0 from 2024-12 repo at: https://download.eclipse.org/releases/2024-12
  3. Bndtools 7.1 from https://bndtools.org/bndtools.p2.repo/7.1.0/
  4. ECF 3.15.3 from https://download.eclipse.org/rt/ecf/3.15.3/site.p2

...the problem described above does not occur.

There might be more than one copy of Apache httpclient 4.5.* in the Eclipse Committers package that is causing a class initialization failure in jgit, that results in the exception bubbling up to bndtools 7.1 workspace template when attempting reading from github.

org.apache.http.conn.ssl.SSLConnectionSocketFactory exists in 4.5.* of httpclient, but does is in a different package in httpclient5 (which is now used by Eclipse 4.34 for install update) i.e. org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.

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

1 participant