Eclipse add Tomcat 7 blank server name - eclipse

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

Related

the eclipse launcher does not exist

I downloaded the eclipse from the official site then i ruining the command sudo ./eclipse-inst i choose the installation folder in /user then the installation is completed with success and i tested a hello example and it's work . But i didn't find th launch icon on my application.
i created a file eclipe.desktop sudo nano /usr/share/applications/eclipse.desktop and add this config . but i still have the same problem
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse IDE
Comment=Eclipse IDE
Exec=/usr/eclipse/eclipse
Icon=/usr/eclipse/icon.xpm
Terminal=false
Type=Application
StartupNotify=false
how can i launch eclipse and solve this problem
if you want you have a easier way to install eclipse on GNU/Linux with the Eclispe Installer, you will can also update it in a easier way.
Eclipse installer on Linux
i used this command and it's work sudo chmod 775 -R/root/

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

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.

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

mvn command not found mac terminal

I am trying to follow this guide to set up hadoop on my eclipse however, when I am at this part:
$ mvn install -DskipTests
my terminal returns
-bash: mvn: command not found
what am I doing wrong here?
Install homebrew the missing package manager for macos
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install maven
brew install maven
You need to either install eclipse with maven plugin or use eclipse itself to run the maven commands or set environment variable to the location where maven exists or install maven and configure env variable to the location of maven installation.
You can find instructions to install in this link for windows.
http://www.mkyong.com/maven/how-to-install-maven-in-windows/
try command:source ~/.bash_profile in you terminal
One method, you can try, is to use the login command from inside the eclipse terminal. It will ask for your system username and password. On successful login, you'll get the fully working eclipse terminal (just like the normal mac terminal).
One heads-up though, after login eclipse terminal will start from the home directory (~/), so it would be better to do a pwd before using the login command in order to copy the directory path and do a cd to the exact directory you intended. Also, you have to redo it for each new terminal you open.
An EASY way is to use a plugin called EasyShell (search it in the marketplace). It makes life easier.

problem running eclipse on ubuntu?

I downloaded eclipse on ubuntu. But when I run it it show following error.
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/home/awan/eclipse/jre/bin/java
java in your current PATH
Can someone help me to solve this. I don't have experience about this on ubuntu.
thanks
You need to install either the openjdk-7-jre or oracle-java7-jre package.
sudo apt-get install openjdk-7-jre
Note that openjdk-7-jre is easier to install, because it's available via the standard Ubuntu repository, whereas you have to build oracle-java7-jre yourself using java-package.
If you allready installed java** you need to add the Java-Path to your eclipse.ini
in my case it's located at:
/usr/lib/eclipse/eclipse.ini
there you need to add direct under the "openFile" statement, where you replace the path with your java path:
-vm
/usr/lib/jvm/java-7-openjdk/bin/java //!replace with your path to java!
** check wether java is installed by typing the commands
java -version
or
javac -version
If you are sure that java is installed, but it's not found you may have multiple versions installed, check that by:
sudo update-alternatives --config java
and select installation first
I solved it by created a symbolic link java in /usr/bin that points to the VM.
Steps :
Downloaded the appropriate version of Oracle's JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp
extract it to any folder. For example :
tar zxvf ~/Downloads/jdk-8u5-linux-x64.tar.gz ~/DEV
create symbolic link with name java :
cd /usr/bin
ln -s ~/DEV/jdk1.8.0_05/bin/java java
You need to add the JDK to your PATH.
This link should help you get started.
You need to install the JDK or OpenJDK (Eclipse only officially supports the former, but the latter mostly works).
I solved this error message by adding jre path in to eclipse.ini.To solve the error like this,your machine should have java installed.
In my setup eclipse.ini is in
eclipse-jee-mars-linux-gtk-x86_64-5.0.0/eclipse folder.
Add,
-vm /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202/jre/bin
at the top of the file.
In here /home/user/Documents/Softwares/jdk-8u202-linux-x64/jdk1.8.0_202 is my JAVA_HOME
For me, directing JDK path to -vm didn't work.I had to put the jre/bin path which is inside jdk folder.
You need to have a Java environment that can execute the Java instructions in Eclipse for it to run.
Install a suitable Java package in the package manager, and try again. Note that Eclipse does not require a JDK, a JRE is enough.
I tried editing .profile, .bashrc, to no avail. (I'm trying to use eclipse by clicking an icon, NOT by executing it from a bash shell).
SOLUTION: I copied my /home/denise/jdk1.7.0_25/jre to
/home/denise/dev//jre
which is a stupid solution because it defeats the purpose of having a .profile or .bashrc.
and no, there was no .pam_environment file
peace!
I had similar problem. It solved after, I have download JRE from http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
and put it in the path of eclipse as shown below -
abc#ubuntu:~/Downloads/eclipse$ ls
about_files
configuration
eclipse.ini
icon.xpm
p2
about.html
dropins
epl-v10.html
jre
plugins
artifacts.xml
eclipse
features
notice.html
readme
I hope it helps.
First of all you need to set your JAVA path in .bashrc file.
goto cd ~
open .bashrc,vi .bashrc
add a line at the end export path="path/to dir:$path"
do source .bashrc for changes to take effect.
Then open your eclipse.ini file(if you want to locate eclipse.ini do whereis eclipse).
open eclipse.ini,then add a line
-vm
"path/to/bin/of/open-jdk"
Just copy jre and paste in eclipse folder that's it. After this just click on eclipse icon to launch eclipse. Thanks.
artifacts.xml
configuration
dropins
eclipse
eclipse.ini
features
icon.xpm
jre
p2
plugins
readme