Skip to content

Could not resolve module: org.springframework.tooling.ls.eclipse.gotosymbol  #962

Closed

Description

@ahoehma

Describe the bug
After some updates of m2e my sts4 stops working.
Until yet my understanding was that eclipse is using multiple version of a dependency. Means installing newer stuff
can't break other (older) plugins. May I'm wrong here?

To Reproduce
Try to install all the latest stuff from https://download.eclipse.org/technology/m2e/releases/latest/ into a standard sts4.

** Stacktrace
org.osgi.framework.BundleException: Could not resolve module: org.springframework.tooling.ls.eclipse.gotosymbol [709]
  Unresolved requirement: Require-Bundle: org.eclipse.lsp4j; bundle-version="0.14.0"
    -> Bundle-SymbolicName: org.eclipse.lsp4j; bundle-version="0.19.0.v20221118-0359"
       org.eclipse.lsp4j [350]
         Unresolved requirement: Import-Package: com.google.gson.annotations; version="[2.9.1,2.10.0)"
  Unresolved requirement: Require-Bundle: org.eclipse.lsp4e; bundle-version="0.13.12"
    -> Bundle-SymbolicName: org.eclipse.lsp4e; bundle-version="0.16.0.202212211403"; singleton:="true"
       org.eclipse.lsp4e [347]
         Unresolved requirement: Require-Bundle: org.eclipse.lsp4j.jsonrpc; bundle-version="[0.19.0,0.20.0)"
           -> Bundle-SymbolicName: org.eclipse.lsp4j.jsonrpc; bundle-version="0.19.0.v20221118-0359"
              org.eclipse.lsp4j.jsonrpc [352]
                Unresolved requirement: Import-Package: com.google.gson.annotations; version="[2.9.1,2.10.0)"
         Unresolved requirement: Require-Bundle: org.eclipse.lsp4j; bundle-version="[0.19.0,0.20.0)"
           -> Bundle-SymbolicName: org.eclipse.lsp4j; bundle-version="0.19.0.v20221118-0359"

	at org.eclipse.osgi.container.Module.start(Module.java:463)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1852)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1845)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1786)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1750)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1672)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

Activity

  1. added
    for: eclipse
    and removed on Jan 31, 2023
  2. added this to the 4.17.2.RELEASE milestone on Jan 31, 2023
  3. martinlippert commented on Jan 31, 2023

    @martinlippert
    Member

    I came across something like this as well, worked on a fix for the underlying problem, and the fix will be available as part of the upcoming 4.17.2 release.

    The underlying issue is that newer versions of m2e require a newer version of com.google.gson (version 2.10.x) whereas other parts depend on the older version 2.9.1 and can't use the newer version yet. While this is not a problem per se (you can have multiple versions of gson around), the way some of the STS components defined their dependency on this library caused some bundles to be exposed to multiple versions of this bundle at the same time, causing the dependency resolution to stop working for those bundles - therefore the problem that you see above.

    If you want to give it a try, you can try to update your STS using the latest CI p2 repo for Eclipse 4.26 from https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.26, but I am not sure whether the resolver will be able to clean up the somewhat broken installation that way. But you can give it a try.

    The other option is to start with a fresh 4.17.2 installation (you could grab a latest nightly build from https://dist.springsource.com/snapshot/STS4/nightly-distributions.html, make sure to grab the version that is built upon Eclipse 4.26) and go from there. Installing the latest m2e snapshots into that version works again.

    Closing this one here as fixed.

  4. ahoehma commented on Jan 31, 2023

    @ahoehma
    Author
  5. ahoehma commented on Jan 31, 2023

    @ahoehma
    Author

    Ups. Ignore my last comment :D Was only because my browser-access ... I will try your first idea ... repair via eclipse-update from https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.26 ...

  6. ahoehma commented on Feb 1, 2023

    @ahoehma
    Author

    I tried first idea to repair my old sts4 ... no luck.

    Then I downloaded latest snapshot (Version: 4.17.2.202301302323-SNAPSHOT - spring-tool-suite-4-4.17.2.202301302323-SNAPSHOT-e4.27.0-win32.win32.x86_64). The installed m2e have a problem with ".mvn" folders, if so resources are not processed. (eclipse-m2e/m2e-core#1142)

    I picked the 4.27. read now your hint about 4.26 ... is this really important?

    Anyway ... I tried to install latest m2e release into sts-snapshot ... sts-plugins stop working:

    image
    `
    org.osgi.framework.BundleException: Could not resolve module: org.springframework.tooling.ls.eclipse.gotosymbol [572]
    Unresolved requirement: Require-Bundle: org.eclipse.lsp4j; bundle-version="0.14.0"
    -> Bundle-SymbolicName: org.eclipse.lsp4j; bundle-version="0.19.0.v20221118-0359"
    org.eclipse.lsp4j [328]
    Unresolved requirement: Import-Package: com.google.gson; version="[2.9.1,2.10.0)"
    Unresolved requirement: Require-Bundle: org.eclipse.lsp4e; bundle-version="0.13.12"
    -> Bundle-SymbolicName: org.eclipse.lsp4e; bundle-version="0.16.0.202301300839"; singleton:="true"
    org.eclipse.lsp4e [325]
    Unresolved requirement: Require-Bundle: org.eclipse.lsp4j.jsonrpc; bundle-version="[0.19.0,0.20.0)"
    -> Bundle-SymbolicName: org.eclipse.lsp4j.jsonrpc; bundle-version="0.19.0.v20221118-0359"
    org.eclipse.lsp4j.jsonrpc [330]
    Unresolved requirement: Import-Package: com.google.gson; version="[2.9.1,2.10.0)"
    Unresolved requirement: Require-Bundle: org.eclipse.lsp4j; bundle-version="[0.19.0,0.20.0)"
    -> Bundle-SymbolicName: org.eclipse.lsp4j; bundle-version="0.19.0.v20221118-0359"

    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1852)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1845)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1786)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1750)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1672)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
    

    `

  7. martinlippert commented on Feb 9, 2023

    @martinlippert
    Member

    Sorry for the delay here @ahoehma. Do you still face this issue?

    I thought that I fixed all of the related underlying issues for the 4.17.2 release, so I tried this again, downloaded the 4.17.2.RELEASE version, and installed the latest m2e snapshots - and that seems to work again. Do you observe a different behavior on your end?

  8. ahoehma commented on Feb 23, 2023

    @ahoehma
    Author

    Hi @martinlippert ... same here ... was in holidays :D I didn't try a brand new download/installation sts + m2e ... but (don't know why) ... my current sts with m2e latest works :) But soon or later I will have the time to try the latest stuff hopefully too.

  9. martinlippert commented on Feb 23, 2023

    @martinlippert
    Member

    @ahoehma Quick update here: the latest nightly distribution builds on top of Eclipse 2023-03 milestones already include the m2e snapshot that has the fix, so in case you want to give that version a try before the release goes out mid of March: https://dist.springsource.com/snapshot/STS4/nightly-distributions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsetype: bugtype: install-issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions