简体   繁体   中英

Unknown version of Tomcat was specified in Eclipse

I want to add latest tomcat-7.0.42 in my eclipse. Probably eclipse tomcat server adapter 7 only supports tomcat version upto 7.0.12..

在此处输入图像描述

So please help me how can I configure my eclipse with tomcat-7.0.42

You are specifying tomcat source directory.

You need to specify tomcat binary installation root directory, also known as CATALINA_HOME.

Usually, this is where you untar apache-tomcat-7.0.42.tar.gz file.

This happened to me because Tomcat was still in the process of downloading ( Download and Install ). The message disappeared after a few minutes.

The eclipse window should really have some type of progress indicator showing download status.

To recognise your Tomcat installation folder, Eclipse is scanning for 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

so make sure you're pointing to the right place and have the right read permissions.

Eg

For LINUX the installation directory for Tomcat 7 is: /usr/share/tomcat7

Please use this configuration.

More here: http://gridlab.dimes.unical.it/lackovic/eclipse-tomcat-ubuntu-jersey/

I got the same error and resolved it by giving enough permissions to the folder. I gave full permissions by (you can try limited permissions which is enough for eclipse to run tomcat)

sudo chmod -R 777 apache-tomcat-8.5.33/

FYI, I encountered this error on my mac, but I think it should be same for ubuntu system too.

我在 MacOS 上并使用自制软件安装了 tomcat,以下路径解决了我的问题

/usr/local/Cellar/tomcat/9.0.14/libexec

Probably, you are trying to point the tomcat directory having the source folder. Please download the tomcat binary version from here .For Linux environments, there you can find .zip and .tar.gz files under core section. Please download and extract them. after that, if you point this extracted directory, eclipse will be able to identify the tomcat version. Eclipse was not able to find the version of tomcat, since the directory you pointed out didn't contain the conf folder. Hope this helps!

As soon as you provide the directory where Tomcat needs to be installed and click ok you can notice download and installation starts in the progress tab of Eclipse.

在此处输入图片说明

Let the process complete.The error will automatically disappear.

在此处输入图片说明

Note: It is not mandatory to name your folder CATALINA_HOME . I have tested this with windows. Cannot assert the same for Linux but IMO same rule should apply.

Just in case... Apache Tomcat 8.5.X is not compatible with Apache Tomcat 8.0 server selection in eclipse. And it gives this error.

I know this is and oldie but i had this issue recently with the latest versions of Tomcat and Eclipse on Windows 10.

It was a permissions issue. All i had to do was navigate to the Tomcat install directory and open the folder. I was prompted to access the folder as an Administrator.

After this the versions were recognised by Eclipse and I could add the new runtime.

Go to "Window -> preferences -> Server -> Runtime Environments"

Remove the existing servers they might not have downloaded completely.

Add new Server

For Windows Users,

Use the Tomcat Service Installer from the Apache tomcat downloads page. You will get a .exe file. which Installs the service for windows. It will usually install Apache tomcat at "C:\\Program Files\\Apache Software Foundation\\Tomcat 8.0" and its easily recognized in eclipse.

使用 brew 安装了 tomcat 后,我​​的解决方案是:

sudo chmod -R 777 /usr/local/Cellar/tomcat/<your_version>

就我而言,我使用了错误的目录,正确的是 lib exec 和我的路径:/usr/local/Cellar/tomcat@7/7.0.96/libexec

You are pointing to the source directory. You can run a build by running ant from that same directory, then add '\\output\\build' to the end of the installation directory path.

可能是由于当前用户无法访问 tomcat 安装路径(C:\\Program Files\\Apache Software Foundation\\Tomcat 9.0)。

Since this is evidently happening on Linux, this would be because your dev user might not have read access to Tomcat's installation directory. That's because Tomcat's installation directory (let's say it is pointed to by CATALINA_HOME ) is owned by tomcat:tomcat while your dev user is something that's neither tomcat nor one that belongs to the tomcat group. Therefore Eclipse fails to read ${CATALINA_HOME}/conf/catalina.policy .

The following should fix the permission issue:

sudo find ${CATALINA_HOME} -type d -exec chmod o+rx {} \;

Why do we need the execute bits? Because to traverse a directory and reach its descendants, you need execute permissions. In your case, if CATALINA_HOME isn't yet set, replace the actual installation directory ( /opt/tomcat/apache-tomcat-<version> maybe?) in the above.

For Windows

Just open the (tomcat xx.x) folder once and check if you can see all other root folders while selecting folder. Sometimes windows wont give access to this folder

I want to add latest tomcat-7.0.42 in my eclipse. Probably eclipse tomcat server adapter 7 only supports tomcat version upto 7.0.12 ..

在此处输入图片说明

So please help me how can I configure my eclipse with tomcat-7.0.42

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM