al23dev
al23dev

Reputation: 855

Eclipse internal error while initializing Java tooling

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?

Upvotes: 61

Views: 182922

Answers (22)

Aamer
Aamer

Reputation: 622

Instead of deleleting the workspace & losing the code, try uninstalling the AWS toolkit and then just reinstall it. By going in:

Help > Market Place > search for AWS toolkit > click install button > click change button > uninstall.

Do the same for reinstalling & restart the Eclipse IDE so that it will configure by itself.

Upvotes: 0

Don Smith
Don Smith

Reputation: 553

Upgrading Eclipse to the latest version (2020-12, 4.18.0) fixed the bug for me.

Upvotes: 0

DIleep
DIleep

Reputation: 61

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

Upvotes: 5

anand krish
anand krish

Reputation: 4415

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.

Upvotes: 0

Ramanand Prajapati
Ramanand Prajapati

Reputation: 116

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 ;-)

Upvotes: 1

pburgr
pburgr

Reputation: 1778

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.

Upvotes: 0

Karolis
Karolis

Reputation: 163

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.

Upvotes: 0

Deepak Gautam
Deepak Gautam

Reputation: 1427

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.

Upvotes: 0

Chitraveer Akhil
Chitraveer Akhil

Reputation: 147

I faced the same issue. Switching back to the predefined work-space from the Switch workspace option in eclipse solved my issue.

Upvotes: 0

ArifMustafa
ArifMustafa

Reputation: 4965

  1. Check your Project -> Properties -> Java Build Path has JDK Library instead of JRE System Library.

  2. Go to Eclipse installed directory, Search eclipse.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.

Upvotes: 2

Saket Sinha
Saket Sinha

Reputation: 521

I faced the same issue. But changing two configuration in eclipse.ini resolved my issue.

-Xms512m to -Xms1024m and -Xmx1024m to -Xmx2048m

Upvotes: 4

Jack
Jack

Reputation: 165

Just close the Eclipse or STS and restart it again. This may fix this error.

Upvotes: 0

Pierluigi Vernetto
Pierluigi Vernetto

Reputation: 2050

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.

Upvotes: 0

Chris Gong
Chris Gong

Reputation: 8229

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.

enter image description here

Upvotes: 1

Mohamed Abu Zeid
Mohamed Abu Zeid

Reputation: 231

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.

Upvotes: 23

Rajan Chauhan
Rajan Chauhan

Reputation: 511

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.

Upvotes: 0

Sunil Kumar
Sunil Kumar

Reputation: 545

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.

Upvotes: 1

Sunny Tambi
Sunny Tambi

Reputation: 2493

  1. Close Eclipse.
  2. Go to workspace folder in windows explorer and delete following folders:
    • .metadata
    • .recommenders
    • RemoteSystemsTempFiles
    • Servers
  3. Open Eclipse and provide the same workspace folder again during launch.

Upvotes: 15

Saravanan
Saravanan

Reputation: 11

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.

Upvotes: 1

Sangam Jung
Sangam Jung

Reputation: 37

Just delete the .metadata on workspace, and restart IDE and configure it again properly

Upvotes: 0

Abhinai
Abhinai

Reputation: 1102

Delete your existing workspace and then recreate the workspace and add your projects.

Upvotes: 39

Zsolt Z.
Zsolt Z.

Reputation: 599

I would just like to add, that simply closing and reopening eclipse has always worked for me with this type of error.

Upvotes: 10

Related Questions