Home » JAVA, Java Server Pages (JSP)29 April 2014

Eclipse: Could not load the Tomcat server configuration at \Servers\Tomcat v7.0 Server at localhost-config

I followed the article of installing Eclipse Web Tool Platform (WTP) from these two links:

Servlet and JSP development with Eclipse WTP
Setup Eclipse and Tomcat 7 on Linux

Now, while running my project in Eclipse, I get the following error message:

Could not load the Tomcat server configuration at \Servers\Tomcat v7.0 Server at localhost-config

Solution:

I found the solution on stackoverflow.

It seems to be a bug in eclipse and here is the workaround to solve the bug:

Note: I am using Ubuntu Linux.

– Close Eclipse
– Go to your Eclipse workspace directory
– Then go to directory .metadata/.plugins/org.eclipse.core.runtime/.settings
– In Ubuntu, I do it by: cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings
– Delete the following two files:
– org.eclipse.wst.server.core.prefs
– org.eclipse.jst.server.tomcat.core.prefs
– You can do it by the following command:
rm org.eclipse.wst.server.core.prefs
rm org.eclipse.jst.server.tomcat.core.prefs
– Start Eclipse

If the above solution did not solve the problem then you can try the following solution which contains creating some softlinks along with deleting the above mentioned files.

– Run the following commands in terminal

cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
rm org.eclipse.jst.server.tomcat.core.prefs
rm org.eclipse.wst.server.core.prefs
cd /usr/share/tomcat7
sudo service tomcat7 stop
sudo update-rc.d tomcat7 disable
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat7 log
sudo chmod -R 777 /usr/share/tomcat7/conf
sudo ln -s /var/lib/tomcat7/common common
sudo ln -s /var/lib/tomcat7/server server
sudo ln -s /var/lib/tomcat7/shared shared

– Restart eclipse
– In Project Explorer of Eclipse, you can see ‘Servers’. Right click and delete it.
– Re-add the Server (File -> New -> Other -> Server)
– Now your project on Eclipse should run fine.

Hope it helps. Thanks.

Java Server Pages (JSP)

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • pati

    Thanks, helped!

  • ramesh

    Thanks Mukesh. Very helpful.

  • thanks you for help

  • Ankush

    Suggesting one more way, in the org.eclipse.jst.server.tomcat.core.prefs file as mentioned above rightly, we have an issue. Just open it with any text editor and put the location of your server into inverted commas. e.g. : locationorg.eclipse.jst.server.tomcat.runtime.70=”D:/Apache/Tomcat 7″.
    After that restart eclipse and delete server. Create a new server. It should run. Worked for me. (Note : the spaces in folder name are the main issue.)

  • Piotr

    Great! Worked fine on my Ubuntu