Eclipse internal error while initializing Java tooling - eclipse

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?

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

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.

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.

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

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

I faced the same issue.
But changing two configuration in eclipse.ini resolved my issue.
-Xms512m to -Xms1024m and
-Xmx1024m to -Xmx2048m

Check your Project -> Properties -> Java Build Path has JDK Library instead of JRE System Library.
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.

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.

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.

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.

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

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

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.

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.

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

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

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.

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.

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.

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.

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

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.

Related

eclipse: cannot load workspace

I try to give you a summary of what happened. [...] means that passed some time.
OS is Linux
all was working fine
[...]
every time I started eclipse I needed to switch workspace even if there was only default workspace in the list of workspaces
[...]
I added build.xml following an Ant tutorial to one of my projects
When I ran it using Ant, it ran out of memory. I turned off eclipse.
When I restarted eclipse, once switched to correct workspace each of my open files reported:
Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.
package explorer says: Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.
What's happened? How can I restore it?
I resolved the problem by manually removing build.xml from project folder and restarting eclipse. Hope this helps.
EDIT: after restarting Linux the problem reappeared.
WORKAROUND: The problem seems to happen after an incorrect shutdown. I found this workaround:
close eclipse
restart OS (not sure if is needed)
manually cut the folder of the project opened in eclipse when incorrect shutdown happened and temporary past it outside workspace (i.e. on desktop)
restart eclipse
close eclipse
restore the project folder into workspace
restart eclipse
I answered a similar problem but in Windows in this Question: "Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart." issue in adt ( v22.6.2)
Maybe this will help others.

Problems creating WAR file (Access is denied) (and the archive is probably corrupt but I could not delete it)

Here is the error I'm having trying to build something in Eclipse 3.8 on Windows 7 Pro:
BUILD FAILED
C:\path\to\build.xml:140: Problem creating war: C:\path\to\war\abc.war (Access is denied) (and the archive is probably corrupt but I could not delete it)
Total time: 1 second
I found this already:
problems creating war file
However, I'm running Eclipse as Administrator. In theory, wouldn't this rule out UAC? How about anti-virus?
Eclipse is also installed in the following path:
C:\Users\me\MyCustomApps\eclipse-indigo\eclipse\workspace
The .war file was being written in a folder on the workstation. This folder was shared with a local CentOS VMWare instance. I had a terminal in CentOS that had that path loaded due to the fact that I had recently copied the .war file to my webapps folder.
I simply navigated away from this shared folder in the CentOS terminal window and was able to build the war file without any issues in Eclipse.
I had the same frustrating issue. My solution was, in Eclipse, disable the "Build Automatically" option under the Project menu...which kept regenerating the WAR file. After that, and a restart of Eclipse (not sure if that was needed), I noticed the file no longer existed in my workspace under that project. It showed up one last time under my Eclipse project, but at that point I was simply able to delete it and run a Maven Clean, which was successful. I hope that helps.
Eugene
I had the same issue. A Maven clean install created the target folder with Unknown user credentials. Normally deleting the target folder should solve the issue. In my case a system reboot let me delete the target folder and do a republish.
I was working in a CentOS terminal. Cygwin interferes with windows credentials which causes this Unknown user problem.
I also faced same issue. I increase the Heap Space in eclipse.ini file inside Eclipse folder and resolved the issue. -Xms512m
-Xmx1024m
Under Windows environment variables set MAVEN_OPTS=-Xmx1024m.
Then in Eclipse Set: Run Configuration -> Maven Build -> (select you Maven Launcher) -> Environment -> Append environment to native environment
It will work for me...
To resolve this issue, please deleted the existing war in the location and check whether the jboss instance is running or not. If it is running please stop the server and then do clean build of the projetc. Uncheck the build automatically in Eclipse.
It will work :)

Eclipse Crash "java was started but returned exit code = -805306369"

I'm aware there is an identical post here but none of the proposed solutions have changed anything and they are quite old (problems to do with Java6) and seem to be referring to a bug to do with Eclipse.
My problem is when I am developing in Eclipse for RCP and RAP Developers; either making changes to java files or changing dependencies etc, Eclipse randomly hangs and then freezes. I have to force close eclipse and I get this message
Things I have tried so far:
Restarted eclipse and PC
Added the -clean command to the very beginning of the eclipse.ini file
Created a brand new work space and attempted to develop in that
I'm running on the latest version of Java (1.7.0_13) and haven't got a clue what to do next.
The problem has happened 4 or 5 times in a number of different occasions:
When I have tried to add a new package to the src folder
When I have tried to add a class to a package in the src folder
When I have tried to edit a class in a package in the src folder
When using Ctrl+Space in a class in the src folder
Any advice/tips would be greatly appreciated! Need to get this problem sorted so I can get developing for my 3rd Year University Project :)
java was started but returned exit code = -805306369
is caused by Eclipse´s corrupted workspace, I solved my problem with these 3 steps:
1) Go to your workspace and rename it.
2) Start your eclipse and by default it will create a workspace.
3) Go to File -> Switch Workspace, choose your original workspace.
After a lot of researching and filing bug reports to no avail I tried one last clear out of Java and fresh installs of Eclipse to try and fix the error and it seems to have worked.
Here is what I did:
Un-installed Eclipse for RCP and RAP developers
Un-installed Java from my PC and deleted any old Java folders that were left behind (I didn't do this in previous clear outs so maybe there was an old version of Java messing something up)
Did a fresh install of Eclipse for RCP and RAP developers and a fresh install of the latest Java
I also deleted my old PATH variable for Java in Environment Variables and put the new one at the front of all the other entries
This seems to have fixed the error for now so hopefully it won't be a short term fix
I opened another instance of eclipse and it prompted me to choose a new workspace. I did so and there it was resolved. Then I closed the new workspace and resorted back to old workspace as usual.
If using Maven projects, check pom.xml, this may corrupted. Mine resolved by fixing pom file.
java was started but returned exit code = -805306369 caused by Eclipse´s currupted workspace, I solved my problem with this 4 steps:
Close Eclipse.
Kill the adb from task manager.
Start Eclipse and by default it will create a workspace or start with new workspace.
Go to File -> Switch Workspace, choose your original workspace.

eclipse stuck when building workspace

I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.
Why is this happening and how do I fix the problem?
I was able to fix this with the following:
First, exit Eclipse. Then temporarily move the following .projects folder to a safe location:
mv .metadata\.plugins\org.eclipse.core.resources\.projects projects
Start and exit Eclipse, then move the .projects folder back to where it was originally:
mv projects .metadata\.plugins\org.eclipse.core.resources\.projects
Use at your own risk, of course.
Some time it's very helpful to execute eclipse from command line with "-clean" parameter to enforce it produce clean up for workspace.
eclipse -clean did not work but following did
eclipse -clean -clearPersistedState
Eclipse often freezes for me at 44% if I'm debugging Android over USB.
When disconnecting the device, Eclipse starts.
The accepted answer allowed me to get Eclipse started again, but it seems that the projects lost their metadata. (E.g., all the Git/Gradle/Spring icons disappeared from the project names.) I have a lot of projects in there, and I didn't want to have to import them all over again.
So here's what worked for me under Kepler. YMMV but I wanted to record this just in case it helps somebody.
Step 1. Temporarily move the .projects file out of the way:
$ cd .metadata/.plugins/org.eclipse.core.resources
$ mv .projects .projects.bak
Step 2. Then start Eclipse. The metadata will be missing, but at least Eclipse starts without getting stuck.
Step 3. Close Eclipse.
Step 4. Revert the .projects.bak file to its original name:
$ mv .projects.bak .projects
Step 5. Restart Eclipse. It may build some stuff, but this time it should get through. (At least it did for me.)
Step1:
Open project directory and edit .project file, remove following lines to disable java script validation.
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
Save file.
Step 2:
Go to Eclipse installed directory and open eclipse.ini(or sts.in if you have STS), change xms and xmx value based on your RAM size of your computer.
-Xms512m
-Xmx1024m
-XX:MaxPermSize=256m
OR: in windows, go to eclipse shortcut in desktop, right click->properties-> add following:
C:\software\eclipse\sts-3.6.2.RELEASE\STS.exe -clean -Xms512m -Xmx1024m
Run Eclipse.
Go to Eclipse->windows->preference->Validation, enable Suspend all validators. Do this if you don't want do any validation listed in the list given in Validator panel.
I have this problem whe I have too much maven projects open at once. What I tend to do is:
Restart eclipse (sometimes I need to kill eclipse)
Disable automatic build immediatly (project > uncheck Build automatically)
Right click the project(s) I want to have rebuild
Close unrelated projects
Re-enable automatic build
This enables a functioning rebuild in 99% off the cases in my workspace.
You may want to take a look at How to report a deadlock. You may also want to check the Error view and/or the error log ([workspace]/.metadata/.log). If that doesn't help, you'll probably need to include more info about which plugins you have installed and which projects you have. Can you create a minimal workspace which reproduces the problem?
I faced Similar issue in Eclipse Indigo. I changed the HeapSize it started working correctly. I just added following eclipse.ini file
-vmargs
-Xms1024m
-Xmx1024m
It worked fine after increasing the VM size
The only solution for me (Luna 4.4.1) was this:
Go to Project Properties > Builders and then uncheck the Javascript Validator.
I had same issue with my Eclipse and as a solution, I created new project, copied all resources manually (using windows copy/paste) to new project, deleted old project and that's it.
Sometimes, this happens due to improper System shutdown and Eclipse workspace started facing similar issues.
Hope it will work.
Unselect automatic build using Eclipse-> Windows->Preferences helps fixing this issue.
Deleting some of the JDT indexes (in .metadata.plugins\org.eclipse.jdt.core), particularly the big files, often fix or ease the problem for me.
I just had the same problem.
By using Task Manager to kill the build process and exiting Eclipse with no projects open, I was able to get back into Eclipse and clean the project without opening it. I then restarted Eclipse again,loaded my project and all OK.
I've found that this might also happen if you rebuild a workspace with a project containing a lot of image data (such as a dedicated images project). Might be best to put something like that into its own workspace and handle it separately to the rest of the projects you deal with.
If you can't, then don't clean that project when you clean and rebuild. Only rebuild when necessary.
In my case problem arise after importing downloaded project - stuck at 80% build. Solved by adding write permissions for group to project's files (Ubuntu 12.04).
In my case it helped to remove the source folders from my favorites in the Windows Explorer (Windows 8.0). It seems that the build was not actually stuck, but triggered in some kind of infinite loop (as mentioned here - Bug 342931).
Sometimes the problem seems to be fixed by killing other programs which have files open from the project folder.
Looking at the logs in [workspace]/.metadata/.log provided useful information for me.
Turned out there was a java.lang.OutOfMemoryError: PermGen space error when the workspace build would hang.
This can be edited in the eclipse.ini or sts.ini(If you are using SpringSource Tool Suite) file.
I faced the same problem when I tried to install Angular.js with bower in my project. I seems bower has lots of javascript files it downloaded automatically which caused my IDE to stuck in validation process for a long time. So, I solved this problem this way,
I first installed tern.js 0.9.0.
Then I went to the project properties, selected tern script path
included only the path I needed for validation, My project's
javascript folder. I excluded other path like placeholders,
Angular.js files, Jquery files.
I selected the Javascript from the properties again and did the same
things in include path's source.
My IDE currently working without freezing. I took help from there. Tern
I guess it can be helpful, where any IDE stuck due to lots of Javascript file.
I tried lots of these suggestions, but the only thing that finally worked for me was creating a new workspace, and freshly checking out all my projects into that folder. Then it worked fine ;-)
I just restarted eclipse and it started working the next time.
Refresh all the projects u want to build.
Worked
Restart eclipse.
It worked for me several times.
I was able to solve this by removing extra folder that Eclipse had created in my eclipse installation folder. I didn't install and I was using Eclilpse Neon 3 with Spring Tool suite also installed. But, when I looked into extracted eclipse installation, I had C: folder which had some folder structure. It was mirror image of my Downloads folder. I removed it and restarted.
It worked for me!
None of the the answers here worked for me. What worked was to delete the following folder
C:\Users\your username\workspace\project
name.metadata.plugins\org.eclipse.core.resources.projects\project
name\.indexes
Rather than debug and find the exact root cause(s) for this, I just deleted the projects and the metadata folder. Eclipse will rebuild the .metadata file the next time it's launched.
I then pulled in the latest project code and the problem was solved. It was more work as I had to reconfigure everything, including my servers, but build workspace had been stopping at 50% for anywhere from 3 to 5 minutes before it would completely finish, so it was worth the effort.
Also, I've found that with Eclipse, if you stop the build workspace before it completes and shut down Eclipse if that hangs up everything, you can really mess up your configuration and waste lots of time trying to get it stable again. I'm using Eclipse Oxygen, but I've had this happen in all the versions of Eclipse I've used, so I really try to avoid it, if possible.
Inside the project folder open .project file. There is a bad entry and it might help
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
If you are using Maven as a build tool you might want to:
Close eclipse
Delete dependency directories located in .m2/repository/ - in
Linux
it's located under Home directory and in Windows it should be in c:\Users<YourUsername>.m2 (replace '' with your
username)
Start Eclipse and enjoy normal work :)
That helped me resolve this issue and I hope it helps you too. :)
Cheers!
P.S. I've edited my answer (as #howlger asked) where it was also suggested to delete .eclipse and .p2 folders as it can do harm (although it did NOT in my case + I had to reinstall some of plugins I'm using).
In case there is a problem on start when building your project disable the build automatically from menu. Project -> Build Automatically. This solved my problem while more sophisticated solutions could not.

Can't add server to a moved workspace

I have this workspace downloaded off the web and I try running it on a tomcat server from a fresh installation of Eclipse Ganymede. This particular project came with its own workspace.
When I select Tomcat v6.0 I get a message
Cannot create a server using the selected type
Older tomcat versions are available, though.
I guess I have to recreate some configuration setting. The question is which one? This seems to be some odd error as creating a new dynamic web project lets me configure tomcat for both of them
I had a similar problem, but my solution is a little simpler. The problem was causesd by renaming the original folder that was referenced by the server definition.
Go to Window/Preferences/Server/Runtime Environments, remove the broken reference. Then, click 'Add' to create a new reference, select the appropriate tomcat version, click next and you'll see the incorrect path reference. Fix it. Move on.
I had this same problem on Ubuntu 8.10 with Ganymede and Tomcat6. This appears to be some sort of bug with Eclipse. If you try and create a server, and it barfs, you can't create another tomcat6 server. To correct this problem, do the following:
close eclipse
go to the {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings directory and remove a file called org.eclipse.wst.server.core.prefs.
start eclipse
add your tomcat6 server in the server tab
kotfu
#id thanks for the solution but something is also hidden in org.eclipse.jst.server.tomcat.core.prefs
So in order to solve the problem
close eclipse
go to {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings
remove the files org.eclipse.wst.server.core.prefs and org.eclipse.jst.server.tomcat.core.prefs
Tomcat 5.5
I order to be able to use the tomcat5.5 server you need to have a writeable catalina.policy file as mentioned in
http://dev.eclipse.org/newslists/news.eclipse.webtools/msg16795.html (= add a READ and WRITE permissions to the files in directory "{$tomcat.home}/conf" (chmod -vR a+rw {$tomcat.home}/conf/*). To be more specific, on the file "catalina.policy". After that, the Tomcat server can be added in the Eclipse servers)
(dead link) http://webui.sourcelabs.com/eclipse/issues/239179
and to have the tomcat5.5 stopped before entering eclipse and started afterwards.
Tomcat 6
In order to be able to use the tomcat6 server the proper solution is to have a user instance of the tomcat6 server as described in
/usr/share/doc/tomcat6-common/RUNNING.txt.gz
RUNNING.txt (on the WEB)
My configuration is Debian/Sid, Eclipse 3.4.1. Ganymede
The error view really is key. There is a lot of detail in there -- if necessary, right-click on the entries and copy their contents into your favorite text editor. One problem that can come up, for instance, is that if you have a server configuration already in place, and one of the configuration XML files is unparseable, the server can't be added. This happened to me this evening -- my <Context> element had a linebreak in it, so it was <C(linebreak)ontext>. This prevented Eclipse from recreating the server configuration.
i finally got mine to work with the default Ubuntu 8.10 tomcat. (the debug command-line on eclipse is a wonderful thing) First i had to make a couple of symbolic links and then change the permissions to a file. (you might want to think twice about changing the permissions depending on your configuration, but if eclipse can't read the file it throws and exception and the gui won't let you continue)
sudo ln -s /etc/tomcat6 /usr/share/tomcat6/conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy /usr/share/tomcat6/conf/catalina.policy
sudo chmod a+r /usr/share/tomcat6/conf/tomcat-users.xml
Hum it can tricky. Bring the "server" view. If your project has already been deployed, remove it from the server to clean the binding between your project and the server.
Or you can right-click on your project in the project explorer and choose debug on the server. If you don't done it already, Eclipse should ask you to create a server runtime and here you can specify Tomcat 6 and specify the location of your server installation.
You can also see the "problems" view to see any problm in the project imported like the JDK etc...
Look in the error view. If you tried to set one up once and failed, Eclipse seems to try and look there again later just before allowing you to create a new one. If you've deleted the folder or its not there any more, you need to replace it so that you can proceed.
The only way I found to use the Tomcat 6 is changing the ownership of the Tomcat directory to my user. It seems that is not enough to have r/w permissions.
BTW, removing org.eclipse.wst.server.core.prefs erases you workspace configuration.
I had had same problem until I went to tomcat6 configuration directory and added ownership to my user in addition to root:
cd /usr/share/tomcat6/conf
chown root:myusername ./*
chmod 777 ./*
You can choose some better chmod for security, 777 is just a quick brutal fix.
I have Eclipse 3.5 (Galileo) + Fedora 12 + Tomcat 6 extracted from tar(which is why Eclipse could not access it). Eclipse had been complaining "Cannot create a server using the selected type".
What version of Eclipse? Europa? Ganymede?
What do you mean by workspace? An Eclipse workspace is not something you deploy, it holds your projects.
You will need to generate a WAR file (or the folder of files that would comprise the WAR file), a project would typically include an ANT or Maven build script to do this, or if the project used Eclipse's Dynamic Web Project type there might be a 'generate WAR' option somewhere. Without further details I can't help any more.
Adding a new dynamic web project to the workspace seems to 'unlock' the feature.
Changing the ownership to my user worked for me.
In my case, it was the corrupted Tomcat configuration files. Eclipse log was saying:
org.eclipse.core.runtime.CoreException:
Could not load the Tomcat server configuration at
C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.14\conf.
The configuration may be corrupt or incomplete.
Got a new Tomcat distribution, removed the old one and all good now.
Finally got this problem solved on my system.
1) got rid of the apt-gotten tomcats
2) installed a typical tomcat from bins at tomcat.apache.org
3) got rid of my openjdk
4) installed the sun jdk (apt-get)
5) removed my web projects in eclipse
6) noticed that when adding a web project you can set "Target Runtime" - I tried setting it to Tomcat 6 and it let me know there was a problem
Maybe none of the above mattered, but here's what might have mattered:
7) KICKER: Window -> Preferences -> Server - Runtime Environments. Removed any crappy runtime environments here, and added the path to my newly installed tomcat.
This Question is maybe old. But I just ran into this problem. My project was not recognized as a web project (no globe icon in Eclipse ).
Suppose you use maven plugin , it failed to convert to web project with command
mvn eclipse:eclipse -Dwtpversion=1.5
In package Explorer, right-click on the project / configure / Convert to Java Facets project/ Dynamic Web project in Eclipse
Et Voilà
Check the .project file at the root before and after the convert.
You will see new natures.
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
Instead of deleting config settings files, just go to Preferences -> Server -> Runtime Environments and remove the "forgotten" environment....
Thanks a lot this answer working for me..
I had a similar problem, but my solution is a little simpler. The problem was causesd by renaming the original folder that was referenced by the server definition.
Go to Window/Preferences/Server/Runtime Environments, remove the broken reference. Then, click 'Add' to create a new reference, select the appropriate tomcat version, click next and you'll see the incorrect path reference. Fix it. Move on.