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

JDTLS attempts to start fragments #2762

Closed
guw opened this issue Jul 17, 2023 · 2 comments · Fixed by #2763
Closed

JDTLS attempts to start fragments #2762

guw opened this issue Jul 17, 2023 · 2 comments · Fixed by #2763
Labels
Milestone

Comments

@guw
Copy link
Contributor

guw commented Jul 17, 2023

From the client log file:

    'Contains: Bundle startup failed reference:file:/....logback.jar\n' +
    'org.osgi.framework.BundleException: Invalid operation on a fragment. osgi.identity; type="osgi.fragment"; version:Version="..."; osgi.identity="....logback" [id=123]\n' +
    '\tat org.eclipse.osgi.container.Module.checkFragment(Module.java:543)\n' +
    '\tat org.eclipse.osgi.container.Module.start(Module.java:426)\n' +
    '\tat org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)\n' +
    '\tat org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.startBundles(BundleUtils.java:280)\n' +
    '\tat org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.loadBundles(BundleUtils.java:167)\n' +
    '\tat org.eclipse.jdt.ls.core.internal.handlers.InitHandler.handleInitializationOptions(InitHandler.java:100)\n' +
    '\tat org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.initialize(BaseInitHandler.java:64)\n' +
    '\tat org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.initialize(JDTLanguageServer.java:275)\n' +
    '\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n' +

Looks like JDTLS needs some logic to not attempt to start fragments.

guw added a commit to eclipseguru/eclipse.jdt.ls that referenced this issue Jul 17, 2023
@rgrunber rgrunber added the bug label Jul 17, 2023
@rgrunber rgrunber added this to the End July 2023 milestone Jul 17, 2023
guw added a commit to eclipseguru/eclipse.jdt.ls that referenced this issue Jul 17, 2023
@snjeza
Copy link
Contributor

snjeza commented Jul 17, 2023

JDT LS includes one fragment. See
https:/eclipse/eclipse.jdt.ls/blob/24c3892b7761a81a00bf0361153f3b0bf40219fb/org.eclipse.jdt.ls.logback.appender/META-INF/MANIFEST.MF#L6

We should not skip it
@guw Could you try to clean your global storage

$ rm -rf ~/.config/Code/User/globalStorage/

@guw
Copy link
Contributor Author

guw commented Jul 17, 2023

@snjeza The fragment you mentioned is not going through that code path. This is only called for extensions contributing additional bundles to JDTLS. That's why you don't get that error for the fragment included in JDTLS. You would get it otherwise because fragments cannot be started. It's impossible in OSGi.

However, this is an interesting case. The host (where the fragment is attaching to) might need to be re-resolved for the fragment to become attached. Thus, extensions should probably not expect fragments to work.

rgrunber pushed a commit that referenced this issue Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants