STS Upgrate leads to MatchLocator problems
Asked Answered
L

2

8

I recently let STS update itself from 3.1 to 3.5 and now I'm getting errors regarding the MatchLocator class. I'm not sure what MatchLocator is, but it appears to be a core Eclipse service.

When I open STS I get 'Initializing Java Tooling' has encountered a problem.

An internal error occurred during: "Initializing Java Tooling". org/eclipse/jdt/internal/core/search/matching/MatchLocator

After it's open I get an error marker for each applicationContext.xml in each project that says

java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/core/search/matching/MatchLocator

No lines are marked, just that it's a "Spring Beans Problem"

When I close STS I get Problmes occurred while trying to save the state of the workbench with details:

An internal error occurred during: "Initializing Java Tooling". org/eclipse/jdt/internal/core/search/matching/MatchLocator

I've tried downloading a fresh copy of STS 3.5 to a separate directory and each of my workspaces still have this error so I suspect the problem is in the .metadata directory. A couple other Stack Overflow posts have recommended deleting the workspace .metadata or .metadata\.plugins directories and letting Eclipse rebuild them for that workspace but that didn't fix it either.

I'm running on a Mac with these plugins: m2e Maven Integration and associated plugins, Scala IDE, STS and StartExplorer.

Is there a way to restore the missing MatchLocator files?

Lecroy answered 8/4, 2014 at 20:13 Comment(1)
I'm getting the same issue as well with similar plugins on a Mac (without StartExplorer)Sharasharai
L
8

Fixed this by removing this file in each workspace:

[workspace]/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

Opening STS from the command line (on mac: ./STS.app/Contents/MacOS/STS -clean) and viewing stack traces on startup led me to this answer: https://mcmap.net/q/690154/-eclipse-missing-action-set

Now all the random ways this bug was manifesting itself have gone away: JUnit tests not running, cmd+clicking to open declarations not working, various MatchLocator errors on startup and shut down.

Lecroy answered 29/4, 2014 at 21:9 Comment(0)
M
0

One of the simplest solution for this problem is that we have to launch a new eclipse IDE and again we install STS tool plugin then import your project. It works well and u get free from errors.

Multifarious answered 9/4, 2017 at 3:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.