Tomcat and Eclipse Integration Error: "Unknown version of Tomcat was specified."

36,683

Solution 1

I suggest installing standalone Tomcat into /usr/local instead of using the one in /usr/share directory.

cd ~/Downloads
wget http://apache-mirror.rbc.ru/pub/apache/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.tar.gz
tar -xzf apache-tomcat-7.0.52.tar.gz
sudo mv apache-tomcat7.0.52 /usr/local/apache-tomcat7.0.52

Then use /usr/local/apache-tomcat7.0.52.

Solution 2

Make sure that the Tomcat folder you're pointing to contains the following files:

conf/catalina.policy
conf/server.xml
conf/web.xml
conf/context.xml
conf/tomcat-users.xml
conf/catalina.policy
conf/catalina.properties
lib/catalina.jar

as Eclipse is scanning for them.

Tomcat v8.0 Server at localhost in Eclipse

Here is a Linux command which can help you to find that folder:

find /opt /usr '(' -name catalina.policy -o -name tomcat-users.xml -o -name catalina.properties ')' -exec sh -c 'dirname $(dirname {})' ';' | uniq

Solution 3

In Ubuntu the application doesn't have default permission to read/edit all the folders.

I realized that the permissions for the TOMCAT installation directory were not set correctly.

I changed it to 755 and it worked.

sudo chmod -R 755 /opt/tomcat/apache-tomcat-9.0.24/
Share:
36,683
Nemesis
Author by

Nemesis

Updated on September 18, 2022

Comments

  • Nemesis
    Nemesis almost 2 years

    I am using Ubuntu 13.10 and gnome 3.10.

    I have followed this tutorial to set up tomcat and eclipse.:

    Set up Eclipse and Tomcat 7 on Ubuntu 12.10 to create Java RESTful Web Services with Jersey

    But when I reach step 9, I get the following error on eclipse:

    Unknown version of Tomcat was specified

    I tried many solutions I saw here on Ask Ubuntu but none worked for me.

    I have checked the usr/local folder but tomcat7 is not there.

    I checked the /usr/share folder and tomcat7 is there.

    tomcat location

    I used the following command to install eclipse and tomcat:

    sudo apt-get install eclipse tomcat7 -y
    
  • Nemesis
    Nemesis over 10 years
    Thanks for the quick reply, I updated the text and I have added the /usr/local folder content. as you can see the tomcat is not there but it is located in /usr/share/
  • Nemesis
    Nemesis over 10 years
    It's still the same. I have added a new screenshot.
  • Danatela
    Danatela over 10 years
    where from did you get this Tomcat?
  • Nemesis
    Nemesis over 10 years
    This is how I installed eclipse and tomcat: sudo apt-get install eclipse tomcat7 -y I have followed the steps in the tutorial.
  • Danatela
    Danatela over 10 years
    Oops, I made a mistake. Move tomcat7 directory back.
  • Nemesis
    Nemesis over 10 years
    Already done :)
  • Nemesis
    Nemesis over 10 years
    Thanks.. I used sudo apt-get purge tomcat7 to remove the previous tomcat and then I followed your instructions and now it's working like a charm :) Thanks a lot