Unknown version of Tomcat was specified in Eclipse - java

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.
E.g.
OS X (if installed via brew), it's: /usr/local/opt/tomcat/libexec
Linux/Ubuntu: see: Tomcat and Eclipse Integration Error

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.

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.

I am on MacOS and installed tomcat using homebrew, Following path fixed my problem
/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.

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.

Having installed tomcat with brew the solution for me was:
sudo chmod -R 777 /usr/local/Cellar/tomcat/<your_version>

In my case I used wrong directory, the right one is lib exec and my path:
/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.

It may be due to the access of the tomcat installation path(C:\Program Files\Apache Software Foundation\Tomcat 9.0) wasn't available with the current user.

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

Related

Unknown version of Tomcat was specified with tomcat -9.0.37

I downloaded the windows service installer of version 9.0.37.But at the time of connecting tomcat with eclipse IDE which is of version 2020-06 it is showing error that the version of tomcat was unspecified.
So please help me how can I configure my eclipse with tomcat-9.0.37
Look, you need to atleast open the folder once.
It will ask you the permission to enter after which it's contents will be visible to u as well as Eclipse.
So, after setting up and installing Tomcat, just go into the folder once, open it & then try connecting from Eclipse.
Instead of changing permissions, try this once!
From the WTP Tomcat FAQ: "To support searching for Tomcat runtimes, the contents of each directory being tested is checked for a set of content that uniquely identifies the version of Tomcat. These sets are based on the standard zip or tar.gz downloads from Apache. The packaged install for various versions of Linux (and even for other Operating Systems) might not quite match the expected set of files."
So get and unpack the zip file from https://tomcat.apache.org/download-90.cgi in a folder your user owns and use that instead (with its own port numbers or after disabling your Tomcat service).
I had the same problem. Later when I tried accessing the Tomcat folder from the file explorer, it said you need permissions to access this folder. This made me realize that the folder is in read-only mode.
So in the file explorer, right-click on Tomcat 9.0 folder, go to properties, click on the checkbox beside Read-only to deselect it and then click on OK.
Then again try the add server process in eclipse. It should work now.
Tomcat folder is in the following location :
C-> Program Files -> Apache Software Foundation
or wherever you have installed Tomcat.
I had first downloaded the .exe file in apache website and I had this same issue. I tried to change the permissions but it did not work so I went back to apache website and downloaded the .zip file. I extracted it to the same folder I have eclipse and closed and opened eclipse again. It worked this way.
You've to specify where the tomcat is, it can be from
a) Program files
C >> Program Files >> Apache Software Foundation
b) If tomcat is downloaded and you've zip,
Specify the Tomcat file location, don't select bin/conf folder, Tomcat won't be recognized but specify the folder of Tomcat Downloaded.
Doing any of these you can add sever in Eclipse
just try to enter C-> Program Files -> Apache Software Foundation -> tomcat ->bin and make sure there are files installed in this folder.
after that you can add the server in eclipse it will work.

Starting Tomcat 7 from command line (Windows)

I'm wondering if there is a way to start Tomcat7 server from the cmd line?
I researched this and all signs seem to be pointing to running a startup.bat/shutdown.bat file that should be present in the bin folder of my Tomcat directory.
However, my bin folder doesn't contain these files.
It only contains:
- bootstrap.jar
- Tomcat7
- Tomcat7w
- tomcat-juli.jar
I did a bit more searching for these .bat files and stumbled across shortcuts called 'Configure Tomcat' and 'Modify Tomcat'. The 'Configure Tomcat' just gives you an option to start/stop the server by clicking a button and the 'Monitor Tomcat' didn't appear to do anything.
Is this normal? Or did something go wrong with my download?
I feel like there should definitely be a way to start the server in the cmd line.
Thanks in advance.
UPDATE: I uninstalled and reinstalled Tomcat7 and there were still no startup/shutdown.bat files present but however now I can start and stop the server from the system tray beside the clock. Hopefully this will help me..
The Tomcat EXE/installer package for some reason does not include the startup scripts found in the bin/ directory. Instead, grab the ZIP distribution and copy the files from the bin/ directory into your existing installation.

NetBeans 8.0.2 fails to start Tomcat because of missing catalina.bat

I just finished setting up the prelimanary steps for a Java Web project on NetBeans. I installed NetBeans and created a network drive using Samba on my home Ubuntu Server, which has Tomcat7. When I try to run the example Hello World project, i get the following error:
Starting of Tomcat failed, the Z:\usr\share\tomcat7\bin\catalina.bat startup script is missing.
C:\Users\\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1150: Starting of Tomcat failed, the Z:\usr\share\tomcat7\bin\catalina.bat startup script is missing.
BUILD FAILED (total time: 3 seconds)
I checked the directory its is referencing and there is a catalina.sh file but no .bat file. Anyone know hints to get this file or how to get NetBeans to run the .sh file instead?
Download the appropiate zip file from https://tomcat.apache.org/. I use Tomcat 8.0.33 and I download zip file from the zip link in the Binary Distributions subsection of the 8.0.3 section download zip file.
Open the zip file (you don't need uncompress it), go to bin folder, copy the catalina.bat file.
Go to Apache Tomcat bin folder in you machine and paste the catalina.bat file.
Go to you NetBeans, click on Services tag (window -> services), left click in ApacheTomcat, click Start option
If must copy other files like setclasspath.bat, go to step 2.
If you are using Windows, Netbeans need the .bat file, not the .sh file.
catalina.bat file is distributed with the Tomcat binary distribution.
It's not in your path means either you have mingled with the files or you have downloaded wrong distribution (eg: source distribution).
So download a fresh copy of tomcat from here, set the path correctly and try again.
For some reason that I don't know, if you download the zip version of Tomcat, the .bats are there. It's not the same for the installer version though. (I am on Windows BTW, I don't know what happens on Linux.)
The Problem is happening when you are using the installer, use the distribution copy. it worked for me

Tomcat 7.0 not getting start from Eclipse

I have installed tomcat 7.0 on my system. When I am trying to run my application on the server from eclipse, it shows me this error
The archive: C:/Program Files/Apache Software Foundation/Tomcat 7.0/bin/bootstrap.jar which is referenced by the classpath, does not exist.
What can be the issue?
double-click on Tomcat server --> click on Overview of Tomcat settings appears --> "Open launch configuration" then Classpath --> under classpath...Edit User Entries here
As your Error shows bootstrap.jar is not in classpath so,
Go through eclipse-->Build path--> configure build path check your server .
Check the your server lib for given jar
If this is not resolve your problem delete your server , install again, and add your server in your new eclipse workspace project.
Hope it will help.
Try deleting the server configuration, and configure the server again.
If it doesn't work, change the server directory location.
If still issue, try un & reinstall of Tomcat. As a last option - try Tomcat 6/8 instead of 7.
you have to add class path of java in the environment variable and then add the path of your Tomcat to the PATH.

Tomcat, Netbeans Mac OSX Lion

I've just bought an iMac and would like to start programming on it. But I can't configure Tomcat and Netbeans to work together. I installed Tomcat and it seems it is working. But when I try to build a web application, netbeans ask all the time my user name and password. I already configured the user.xml but it's not working.
Can anyone give a tip?
Cheers
I had the same issue and I followed #Raph's answer and it worked. After that, I had another issue, Netbeans returned this error message:
Deployment error: Starting of Tomcat failed, check whether the /Applications/Tomcat/bin/catalina.sh and related scripts are executable
To solve this, in terminal, I navigated to tomcat-folder/bin and executed:
chmod 755 *.sh
And it solved my issue, cause it made the scripts executable.
Add a new Tomcat server is quite easy on NB. No "install" as a traditional sense needed to do that:
Download any compressed (not installers) tomcat version from http://tomcat.apache.org
Just unzip (uncompress) in your preferred folder. You dont need do any thing else.
Go to Tools ---> Servers -----> Add server.
Select Apache Tomcat Server. Then on "server location" label, select the folder where you have uncompressed your Tomcat Server. You can define in this window your log and password. NB will automatically change your user.xml.
This is a good way to configure as many servers as you want, and easily configure its access and management data.
I hope it helps.

Categories