Tomcat 6 server creation using eclipse IDE on ubuntu

Viewed 78617

I'm having a problem running tomcat 6 with eclipse 3 in ubuntu.

I installed tomcat 6 on my machine and when I tested it using http://localhost:8080, it worked fine.

But whenever i want to create a server in eclipse, i select Tomcat 6 , i get the following message "Cannot create a server using the selected type", and i can't click next.

Any idea why?

17 Answers

There’s a better workaround so you can keep Ubuntu’s Tomcat6 (taken from http://ubuntuforums.org/showthread.php?p=8541057, by DisDis)

In a terminal:

sudo apt-get install tomcat6
cd /usr/share/tomcat6
sudo ln -s /var/lib/tomcat6/conf conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat6 log
sudo chmod -R 777 /usr/share/tomcat6/conf

There. Now just go to Window/Preferences/Sever/Runtime Environments, add the Apache Tomcat6 Server and use /usr/share/tomcat6 as the installation directory!

ok, so here's what worked for me: you must go to Window>Preferences

here, go to Server>Runtime Environments

remove the old server or add your server or change the server location...

(in my case, this problem arised when i changed the tomcat server location)

now you should be able to add new servers to your environment :)

Have you been using the ubuntu-tomcat version (e.g. "aptitude install tomcat6")? If so, please download a plain vanilla version from tomcat.apache.org and use this. The Debian/Ubuntu version relocates some jars around and eclipse expects the "pure" version and jar locations.

(Also: see Eclipse bug 239179)

Remove (or edit the apache tomcat v6.0 entry in) workspace.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jst.server.tomcat.core.prefs

I think you also need to restart

I had the same problem, but with tomcat 5.5. Changing the permissions on the /etc/tomcat5.5/conf (symlink from /usr/share/tomcat5.5/conf) worked. Thanks!

I was suffering the same problem

I've got the lattest eclipse 3.4.1 GanyMede. Changed the Ubuntu Tomcat 6 install to the plain one from tomcat.apache.org

chmod 666 /usr/share/tomcat6/conf*

and the problem was solved

Go to window > preferences -- Go to runtime environments --- you will probably find the location of the old install of Tomcat. Changing it to the current location will help.

Not sure, but maybe your version of Eclipse does not support the latest Tomcat version? Try to update Eclipse. I have Eclipse 3.4 and there's no problem.

If you can test it with http://localhost:8080 then the server is already running, and there's nothing for Eclipse to create. try closing down the server, and then setting up eclipse to point to the installation directory.

I you have the newer version of eclipse, try to update the Web Tool Plateform plugins in Help/software Updates... If both eclipse and WTP are up to date I don't see were the problem can be...

PS : there is a "comment" button, do not post an answer to comment an answer ;)

I have been having the same problem (on fedora 9). You have to change the permissions of the files inside the tomcat conf directory to rw (chmod a+rw tomcat6/conf/*). Solved it for me!

This one is working for me too Window -> Options -> Server -> Runtime Environments

Edit the existing runtime environment "Apache Tomcat v6.0" and select your tomcat's location.

Window -> Options -> Server -> Runtime Environments

Edit the existing runtime environment "Apache Tomcat v6.0" and select your tomcat's location.

I had the same problem, i use ubuntu 9.04 and tomcat 6.

I installed the tomcat 6 for apt-get, installed also jre, jdk. (SUN)

In order to resolve the problem do:

  • Close the Eclipse;
  • Delete your workspace (save your files);
  • stop the tomcat6 (/etc/init.d/tomcat6 stop)
  • make a link to conf (ln -s /var/lib/tomcat6/conf /usr/share/tomcat6);
  • ln -s /var/lib/tomcat6/catalina.policy /etc/tomcat6/
  • init the eclipse
  • In server tomcat configuration (/usr/share/tomcat6)
Related