Eclipse internal error while initializing Java tooling
EclipseEclipse Problem Overview
I am getting errors from Eclipse Indigo running on Windows 7 Ultimate. For each of the following items:
Android SDK content loader
Building workspace
Initializing Java Tooling
Loading data for Android 2.3.3
Loading data for Android 4.03
this error is thrown:
An internal error occurred during: "Initializing Java Tooling".java.lang.NullPointerException
What should I do?
Eclipse Solutions
Solution 1 - Eclipse
Close all open projects and exit Eclipse. Now you can open Eclipse without getting the error. Start opening your projects one by one to find which one causes the problem. This is most likely because you deleted a Device profile inside the AVD manager.
Or you can start working on a new workspace, (i.e. change your workspace), then try to import your project from the old workspace
Solution 2 - Eclipse
Delete your existing workspace and then recreate the workspace and add your projects.
Solution 3 - Eclipse
Just change the following values at "eclipse.ini" file to the following:
-Xms1024m
-Xmx2048m
Note:
- You can find the "eclipse.ini" file by right click eclipse icon on and select "Open file location".
- This error occurs because the eclipse is running out of memory, so we just increased the assigned memory for the eclipse application.
Solution 4 - Eclipse
- Close Eclipse.
- Go to workspace folder in windows explorer and delete following folders:
- .metadata
- .recommenders
- RemoteSystemsTempFiles
- Servers
- Open Eclipse and provide the same workspace folder again during launch.
Solution 5 - Eclipse
I would just like to add, that simply closing and reopening eclipse has always worked for me with this type of error.
Solution 6 - Eclipse
NO Need to create another work-space and import all the projects from the older one : Just empty \Workspaces\MyEclipse 8.5 M2\.metadata\.plugins\org.eclipse.core.resources\.projects
directory and restart myeclipse/eclipse
Solution 7 - Eclipse
I faced the same issue. But changing two configuration in eclipse.ini resolved my issue.
-Xms512m to -Xms1024m and -Xmx1024m to -Xmx2048m
Solution 8 - Eclipse
-
Check your Project -> Properties -> Java Build Path has
JDK
Library instead ofJRE System Library
. -
Go to
Eclipse
installed directory, Searcheclipse.ini
-> Open it
Search lines for containing any below values:
> -Xms512m > -Xmx512m > -Xms1024m > -Xmx1024m > -Xms1G > -Xmx1G
Just double it the memory size, Assume you have to change the
> -Xms512m to -Xms1024m
Increasing the eclipse memory size will help eclipse
to gain more RAM size from your PC.
Solution 9 - Eclipse
In my case, I restarted my eclipse IDE without deleting/editing my workspace or .metadata folder. Error "An internal error occurred during: "Initializing Java Tooling". java.lang.NullPointerException" is gone and Eclipse just working good.
Solution 10 - Eclipse
Sometimes the issue is with the version of the Java installed. I was facing a similar issue when trying to start Spring Tool Suite on my Ubuntu 16.04. I had java 9 installed on my machine. I changed it to java 8. And it started working.
Solution 11 - Eclipse
My issue was caused by some old Java projects using an old JRE System Library, so all I had to do was remove the old library and add the new one by right clicking the project -> Properties -> Java Build Path -> Libraries -> Add Library.
Solution 12 - Eclipse
I was facing the same issue in eclipse so I am telling you the same step that I did you just need to go eclipse installed folder where you will find the file named eclipse.ini in my case the location was
C:\Users\comp\eclipse\jee-2018-12\eclipse
you can find your location.
in that location, open eclipse.ini in text mode and there you will find some below text
-Xms256m
-Xmx1024m
change it to
-Xms512m -Xmx1024m
I hope that will help you 100% as checked in my System ;-)
Solution 13 - Eclipse
Just delete the .metadata on workspace, and restart IDE and configure it again properly
Solution 14 - Eclipse
My problem too got fixed which i was getting on STS, just closed all the project's including the server on the project explorer, restarted ide, that's it.
Solution 15 - Eclipse
check the Eclipse log (the intelligently named ".log" file in your workspace .metadata folder) and check for the complete stacktrace. In my case it was caused at method "org.eclipse.m2e.jdt.internal.MavenClasspathVariableInitializer.initialize(MavenClasspathVariableInitializer.java:30)" which lead to a never fixed "race condition during startup" bug. I would really recommend dumping Eclipse in favor of a more serious IDE; like IntelliJ or Netbeans. Using Eclipse means that you will invest 40-50% of your time trying to work around this kind of bugs, instead of being productive.
Solution 16 - Eclipse
Just close the Eclipse or STS and restart it again. This may fix this error.
Solution 17 - Eclipse
I faced the same issue. Switching back to the predefined work-space from the Switch workspace option in eclipse solved my issue.
Solution 18 - Eclipse
In my case "MySQL service" is disabled. And I got same error.
So if you are using MySQL then check for it.
Press win+R
then write services.msc
and hit enter. Search for MySQL
service. Start the service.
Solution 19 - Eclipse
In my case, I had two of three projects with this problem in my current workspace. I opened workspace catalog and made a backup of corrupted projects, deleted them afterwards. Then opened eclipse once again. Obviously there was missing data to work with. Closed eclipse once again and added back earlier saved projects without metadata catalogs.
TL;DR. Just remove metadata catalogs from projects in your workspace.
Solution 20 - Eclipse
In my case, Eclipse tried to launch with non-existing workspace folder. Sure the folder is created at the moment, but the exception is occured durring creating the workspace. After the exception I just switched workspace to the right folder. To avoid slipping to non-existing workspace folder I deleted it from Recent workspaces.
Solution 21 - Eclipse
In my case even after deleting the workspace and reimport doesn't work. Because all the files are Corrupted. so have utilized my existing backup data, extracted it & reimported into workspace then it started working fine.
Solution 22 - Eclipse
Upgrading Eclipse to the latest version (2020-12, 4.18.0) fixed the bug for me.