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

java.lang.NoSuchMethodError: 'org.eclipse.egit.core.RepositoryUtil org.eclipse.egit.core.Activator.getRepositoryUtil()' #353

Closed
kris-mart opened this issue Nov 29, 2022 · 3 comments
Assignees
Labels

Comments

@kris-mart
Copy link

Seems like its not working with new egit (my case: org.eclipse.egit.core_6.3.0.202209071007-r.jar)

@kris-mart
Copy link
Author

Duplicate to #345

@howlger
Copy link

howlger commented Apr 18, 2023

In EGit the method has been removed in this commit.

I guess,

final IEclipsePreferences corePrefs =
org.eclipse.egit.core.Activator.getDefault().getRepositoryUtil().getPreferences();
if (corePrefs != null) {
rootFolderPreference = corePrefs.get(DEFAULT_REPOSITORY_DIR_CORE_KEY, null);
if (!StringUtil.isNullOrEmpty(rootFolderPreference)) {
return rootFolderPreference;
}
}

has to replaced by something like:

    private static final String EGIT_PLUGIN_ID = "org.eclipse.egit.core"; //$NON-NLS-1$

    // ...

       rootFolderPreference =
            Platform.getPreferencesService().getString(EGIT_PLUGIN_ID, DEFAULT_REPOSITORY_DIR_CORE_KEY, null, null);
        if (!StringUtil.isNullOrEmpty(rootFolderPreference)) { 
            return rootFolderPreference; 
        }

@howlger
Copy link

howlger commented Apr 19, 2023

As workaround downgrade JGit/EGit to 5.11 or use Eclipse 2021-03.

See also my Stack Overflow answer here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants