Eclipse add Tomcat 7 blank server name
EclipseJakarta EeTomcatEclipse Problem Overview
I was trying to add Tomcat 7 in my Eclipse in Ubuntu. When I click "Add new server" in Eclipse and select "Tomcat v7.0 Server", the field "Server Name" is blank and I cannot type in anything in that textbox as shown below:
What I did before is I deleted a Tomcat 7 server from Eclipse and I was trying to reinstall Tomcat 7. But it doesn't allow me to type anything in that textbox and I cannot proceed to the "Next" button. My environment is Ubuntu Linux and Eclipse for JavaEE.
Eclipse Solutions
Solution 1 - Eclipse
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:
- Close Eclipse
- 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
- Restart Eclipse
Source: eclipse.org Forum
Solution 2 - Eclipse
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/
Solution 3 - Eclipse
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.
Solution 4 - Eclipse
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!!! :)
Solution 5 - Eclipse
I faced the same issue, and I changed the workspace to new location, and it worked. I hope this helps :)
Solution 6 - Eclipse
so weird but this worked for me.
-
close eclipse
-
start eclipse as
eclipse --clean
Solution 7 - Eclipse
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.
Solution 8 - Eclipse
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
Solution 9 - Eclipse
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/
Solution 10 - Eclipse
The easiest solution is to create a new workspace in eclipse/STS.
File -> Switch Workspace -> Others...
Solution 11 - Eclipse
Deleting/Moving files org.eclipse.jst.server.tomcat.core.prefs and org.eclipse.wst.server.core.prefs worked for me.
Solution 12 - Eclipse
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