Eclipse "Unknown version of Tomcat was specified" (Ubuntu) - eclipse

I'm trying to add my Tomcat server to Eclipse but I get the message "Unknown version of Tomcat was specified." I've attached a screenshot to show what values I'm entering:
Notice that Finish button is disabled so I can't continue.The installation directory I've entered here is the same directory as CATALINA_HOME (in tomcat.service). To add the server to Ubuntu prior, I followed this tutorial:
https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04
I can also confirm that when I start Tomcat, and open http://localhost:8080 in my browser that Tomcat is running and it's version is Apache Tomcat/8.5.35. So Tomcat is working OK it seems.
Anything I'm doing wrong in Eclipse?

I had the same problem until I enabled +rwx permissions for the entire Tomcat installation directory.
From the directory one level up from where Tomcat is installed, enter in the terminal:
sudo chmod -R 755 apache-tomcat-version
Restart Eclipse and your Server setup Finish button should now be activated.

I downloaded the tar file, unzipped it to my ~/Downloads directory. When I use this path, it doesn't give an error. I guess permissions as the /opt/tomcat directory is owned by tomcat user(?) Anyway, that seems to have got me pass that issue, I've yet to write an app and run it in Eclipse to test it all out.

If anyone runs into this on Windows 10 as I did, you should click on the Browse button in the Tomcat installer and go into the Tomcat folder. windows will ask for permission and then everything will be okay after that.

Related

How to fix this "Unknown version of Tomcat was specified" (Windows)

I want to connect with tomcat server with eclips IDE. I have already install tomcat 8.5 and 9.0 versions.
Both versions shows this error.
So please help me how can I configure my eclipse with tomcat any versions
Don't use an installed copy of Tomcat. Instead, download the Core zip/tar file and unpack it somewhere under your user's home directory. It has the most predictable layout for needed files and avoid any write permission issues you might have with an installed copy.
https://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_won.27t_the_New_Server_Runtime_dialog_recognize_my_Linux_installed_version_of_Tomcat.3F

Unable to see server location while installing apache in eclipse

I am trying to install Apache tomcat in eclipse. When I am doing New-> Server, I am getting the following window
After clicking on next, It is not asking for Tomcat installation directory and I am not able to run it. Please help
Probably you were installed Tomcat and have deleted manually. You have two options:
delete or change your workspace address in Eclipse and then try to install Tomcat again. It will work.
delete the Tomcat configuration files from workspace folder as following:
Close your Eclipse
got to {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings
delete these files
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
start Eclipse again
install Tomcat again
enter image description here

Eclipse - Add Server - Next Button is disabled when I select a specific Tomcat (e.g tomcat8)

I open Servers view, right click and go to new->server menu.
When I select Tomcat 6 or Tomcat 7 the next button works well however when I select Tomcat 8 the next button is greyed out.
How can I add a tomcat 8 in this case?
I'm using Ubuntu 14.04 and Eclipse mars2 and the accepted answer for this question didn't work for me. I tried everthing from installing new software (extensions, unnecessary because mars already have native support for tomcat8), and adding/removing runtime environments without success.
It is a bug into Eclipse.
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 add Tomcat 7 blank server name
Eventhough it says tomcat 7, it worked for the same problem with tomcat 8 too.
There are a few resource on the web about this problem but no answer on SO.
If you were never add a tomcat8 to eclipse there would be no problem just like tomcat7 or tomcat6. But there is a setting about tomcat8 and that is wrong. In that menu there is no option to reconfigure settings.
Just go to Window->Preferences->Server->Runtime Environments and Remove or Edit the old, wrong settings. Then you will be able to add tomcat8 too!
Ref: http://www.codejava.net/servers/tomcat/how-to-add-tomcat-server-in-eclipse-ide
It is a bug in Eclipse.
You can follow following steps for overcome this problem.
Close Eclipse
Go {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
First try removing/editing respective server at
Window->Preferences->Server->Runtime Environments
then go ahead adding new server, Even after deleting old setup on Window->Preferences->Server->Runtime Environments - If you still have this issue while on Define a New Server from servers tab of eclipse, now try adding tomcat at Window->Preferences->Server->Runtime Environments as we've deleted earlier & then go to Define a New Server from servers tab to create new server, this should work.
I had this issue too, and it was caused by unsufficient file-access rights to the Tomcat server installation directory.
Make sure you have read-access to all files within the Tomcat installation directory you configured in Eclipse (this can be an issue for example if you use the standard tomcat installed in Ubuntu, if you do not belong to the tomcat8 group).
Just go to Window->Preferences->Server->Runtime Environments and Remove the server.
Try to add the server from there only. You will see another folder has been created with the same name.
Provide valid path. Restart eclipse and add server from server console.
Hope it will help..
Go to
Window->Preferences->Server->Runtime Environments
remove tomcat configuration and save.
Go to server view( Window -> show view ->server)
configure the tomcat server again.

root path glassfish v4 eclipse luna

I had just installed eclipse luna and I use the marketplace to install oracle package to use glassfish v4.0. Everything went ok but when I'm trying to install it they still show me an error at the server root path (Error: The specified directory is not a valid GlassFish installation.)...I don't know why? this happen even giving it a path. have anyone resolve this issue?.
I got caught by this trying to following along with the Lynda.com tutorial on web services with Java EE. You need to download and install Glassfish and then point the server root to the glassfish directory. Here are the steps I took:
download glassfish from here: https://glassfish.java.net/download.html
unzip the zip file: this is essentially the install step
navigate into the installation to the glassfish folder: this what you point eclipse to
The high level answer is here: How do I use Glass fish server with eclipse luna for Java EE?
Possible duplicate of How do I use Glass fish server with eclipse luna for Java EE?
However, you need to specify the "glassfish" folder under the extracted GlassFish files, for example ...\glassfish4\glassfish
First Download full platform from https://glassfish.java.net/download.html
Unzip it.
At the window you read this error, go to the browse for server root and find the glassfish folder inside your unzipped folder. Click on it and your error will be gone.

Eclipse add Tomcat 7 blank server name

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.
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
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/
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.
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!!! :)
I faced the same issue, and I changed the workspace to new location, and it worked.
I hope this helps :)
so weird but this worked for me.
close eclipse
start eclipse as eclipse --clean
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.
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
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/
The easiest solution is to create a new workspace in eclipse/STS.
File -> Switch Workspace -> Others...
Deleting/Moving files org.eclipse.jst.server.tomcat.core.prefs and org.eclipse.wst.server.core.prefs worked for me.
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