score:537

Accepted answer

it is a bug in eclipse. i had exactly the same problem, also on ubuntu with eclipse java ee juno.

here is the workaround that worked for me:

  1. close eclipse
  2. in {workspace-directory}/.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
  3. restart eclipse

source: eclipse.org forum

score:0

deleting/moving files org.eclipse.jst.server.tomcat.core.prefs and org.eclipse.wst.server.core.prefs worked for me.

score:0

in eclipse neon.3 release (4.6.3) on ubuntu 17.04 with tomcat 8.0 the problem persists. what helped me was the combination of deleting the prefs files:

rm ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.server.tomcat.core.prefs    
rm ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs

and linking to catalina.policy (somewhat differently than how @michael-brooks suggested for his configuration):

sudo ln -s /var/lib/tomcat8/policy/catalina.policy conf/catalina.policy

score:1

in my case, the tomcat directory was owned by root, and i was not running eclipse as root.

so i had to

sudo chown -r  $user apache-tomcat-version/

score:1

the easiest solution is to create a new workspace in eclipse/sts.

file -> switch workspace -> others...

score:2

after trying @philipp claßen steps, even if did not work then,

change eclipse, workspace and tomcat directory. [tested only for windows7]

i know somebody might say that is not correct, but that did work for me after @phillipp's steps not worked for me.

it took me 4 hours to find this brute force method solution.

score:2

i also had this problem today, and deleting files org.eclipse.jst.server.tomcat.core.prefs and org.eclipse.wst.server.core.prefs didn't work.

finally i found it's permission issue:

by default <apache-tomcat-version>/conf/* can be read only by owner, after i made it readable for all, it works! so run this command:

chmod a+r <apache-tomcat-version>/conf/*

here is the link where i found the root cause:

http://www.thecodingforums.com/threads/eclipse-cannot-create-tomcat-server.953960/#post-5058434

score:3

so weird but this worked for me.

  1. close eclipse

  2. start eclipse as eclipse --clean

score:6

i faced the same issue, and i changed the workspace to new location, and it worked. i hope this helps :)

score:8

i had same issue before: the server name was not appearing in server while configuring with eclipse

i tried all the solutions which are provided over here, but they didn't work for me.

i resolved it, by simply following these simple tips

step1: windows --> preferences --> server --> run time environments --> add --> select the tomcat version which was unavailable before --> next --> browse the location of your server with same version

step2: go to servers and select your server version --> next --> finish

issue resolved!!! :)

score:17

i had a similar issue except the "server name" field was disabled.

found this was due to the apache tomcat v7.0 runtime environment pointing to the wrong folder. this was fixed by going to window - preferences - server - runtime environments, clicking on the runtime environment entry and clicking "edit..." and then modifying the tomcat installation directory.

score:23

i am running kepler in ubuntu and had the same problem getting eclipse to recognize the tomcat7 server. my path to install directory was fine and deleting/renaming the files only did not fix it either.

this is what worked for me:

run the following 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, delete tomcat7 server. re-add server and everything then worked.

here is the link i used. http://linux.mjnet.eu/post/1319/tomcat-7-ubuntu-13-04-and-eclipse-kepler-problem-to-run/


Related Query

More Query from same tag