Cannot install Apache Tomcat in Eclipse - eclipse

I've downloaded apache-tomcat-8.0.8 archive, then I've unzipped it and tried to add it in Preferences -> Server -> Runtime Environments by clicking Search and selecting path to the uzipped archive. What I'm getting is Server Error
No new server runtime environments were found.
Any ideas why it might be happening? I have no Apache Tomcat options in New Server Runtime Environment window, which I get by clicking Add in the previous one. There are such options in every tutorial I read.

I think there currently is no adapter for Tomcat 8 in Eclipse.
Updated
Don't use the search button. Click add and choose an adapter first. Open Apache and choose Tomcat 7. Click next and point the installation directory at your Tomcat folder.

It seem that you have Eclipse without Java EE components.
so you see something like
instead of
Check Apache Tomcat Not Showing in Eclipse Server Runtime Environments (need to install JST Server Adapters )
Once you have plugins installed follow dialog flow e.g. like
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jst.server.ui.doc.user%2Ftopics%2Ftomcat.html

Seems like no java EE component.
Eclipse IDE for Java Developers 'Servers' doesn't exist.
Therefore download correct Eclipse IDE. It is Eclipse IDE for Enterprise Java Developers(Eclipse IDE for Java EE Developers).
Then,
Open Eclipse IDE > Click on the Servers tab located at the bottom > right click > New > click on Server.
Select Apache and then select the appropriate version of tomcat server.click Next.
Select tomcat Installation Directory and JRE. Click next.Click Finish.

Related

Installing GlassFish server in luna

I am trying to install GlassFish server manually and have installed the GlassFish tool from Eclipse market place.
However, when I go to
Windows > Show Views > Other > Server > Servers
New->Server still no option for GlassFish is show.
I am still unable to see the GlassFish server option
How do I resolve this?
How did you install the Glassfish Tools? The correct way is:
install Glassfish (outside of eclipse)
click Window->Preferences
click Runtime Environment
click Add
(probably you won't find Glassfish otherwise go directly to 13.) click link Download additional server adapters
choose Glassfish Tools
Next
Finnish
Reboot Eclipse!
click Window->Preferences
click Runtime Environment
click Add
choose GlassFish
choose GlassFish installation directory (possible if you finnished 1.)
Finnish
Now you should be able use the New Server Wizard within the Server View.

No server in Eclipse; trying to install Tomcat

I'm trying to install Tomcat in Eclipse but I can't get a server tab to show up.
When I go to Window -> Show View -> Other and type in "server", I don't get any results.
When I go to File -> New -> Other and type 'server' I also get nothing.
Does anyone know what happened to my servers and where I can find them? (I've never used Eclipse with servers before).
Try to install JST Server Adapters and JST Server Adapters Extentions. I am running Eclipse 4.4.2 Luna and it worked.
Here are the steps I followed:
Help -> Install New Software
Choose "Luna - http://download.eclipse.org/releases/luna" site
Expand "Web, XML, and Java EE Development"
Check JST Server Adapters and JST Server Adapters Extentions
For future poeple who have the same problem: Try to add server tab from eclipse menu, if it doesnt work, then go do #Tomasz Bartnik solution above, and retry the following again:
Go to WIndow > Show view > Other
search for servers, select it and press OK
It will then be added to your tabs
The reason you might not be getting any results is because you might not be having the J2EE environment setup in your Eclipse IDE. Follow these steps to solve the problem.
Goto Help -> Install new Software
Select {Oxygen - http://download.eclipse.org/releases/oxygen} (or Similar option/version) in the "Work with" tab.
Search for Web,XML,Java EE and OSGi Enterprise Development
Check the boxes corresponding to,
Eclipse Java EE Developer Tools
JST Server Adapters
JST Server Adapters Extensions
Click next and accept the license agreement.
Hope this helps.
I ended up installing a new copy of Eclipse - JAVA EE, and it all works now.
The Web Tools Platform provides the Java EE development tools, and is included in the IDE for Java EE Developers. Among other things, it provides the Servers view and makes it easy to launch a Tomcat server from there. You can either download the IDE for Java EE Developers, or go to the Help menu and Install New Software, looking for the Java EE features.
Steps to follow:
1.Goto Help -> Install new Software
2.Give address http://download.eclipse.org/releases/oxygen and name as your choice.
3.Search for Java EE and choose 1.Eclipse Java EE Developer Tools
4.Search for JST and choose 2.JST Server Adapters 3.JST Server Adapters Extensions
5.Click next and accept the license agreement.
Find the server option in the window-->preferences and add server as you need
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
The reason you might not be getting any results is because you might not be having the J2EE environment setup in your Eclipse IDE. Follow these steps to solve the problem.
Goto Help -> Install new Software
Select relevant dropdown entry {Oxygen - http://download.eclipse.org/releases/<?>} (or Similar
option/version) in the "Work with" tab.
Search for Web,XML,Java EE and OSGi Enterprise Development
Check the boxes corresponding to,Eclipse Java EE Developer Tools
JST Server Adapters
JST Server Adapters Extensions
Click next and accept the license agreement.
Download the tomcat latest zip from
https://tomcat.apache.org/download-90.cgi
Rename the folder with simple name like 'tomcat'.
Save the folder and copy the path.
Goto Help -> Install new Software
Select {Oxygen - http://download.eclipse.org/releases/oxygen} in the "Work with" tab.
Select the last option Web,XML,Java EE and OSGi Enterprise Development
Check the boxes corresponding to 1.Eclipse Java EE Developer Tools 2.JST Server Adapters 3.JST Server Adapters Extensions Click next and accept the license agreement.
You can install Tomcat server form Eclipse market place.
Help -> Eclipse Market Place search for 'Tomcat' -> Install Eclipse Tomcat plugin.
After installation restart eclipse.
Eclipse IDE for Java Developers 'Servers' doesn't exist.
Therefore download correct Eclipse IDE. It is Eclipse IDE for Enterprise Java Developers(Eclipse IDE for Java EE Developers). This way is easy.
You have probably installed Eclipse for Java Developers instead of Eclipse IDE for Enterprise Java Developers, server tab and some other are not available.
You don't have to uninstall. Just rerun eclipse-inst-win64.exe and choose Java EE IDE
JAVA EE IDE Installation

Eclipse error when Adding Tomcat as server runtime environment

When I try to add Tomcat as a server runtime environment in eclipse, I get the following error "No new server runtime environments were found"
The way I am trying to add Tomcat is as follows:
Click "Window"-> "preferences"
Expand "Server->Runtime Environments"
Click Search
In the directroy browser dialog, navigate to and select my Tomcat dir
"C:\program files\apache-tomcat-6.0.26"
Click "ok"
Does anyone know what eclipse is actually looking for when you tell it what folder to search in? If I knew this, I could troubleshoot myself a bit more.
I have tried re-installing tomcat, also installed the next version up (6.0.26)
but still eclipse cannot find it. The version of eclipse I am running is -
"Eclipse IDE for Java Developers" Build id: 20090920-1017
It works fine for me but i'm using Eclipse IDE for Java EE Developers.

how to add Apache Tomcat6 to eclipse?

when i go to windows preferences, there is no Tomcat6 !!!
how can i add tomcat6 new server runtime environment in eclipse 3.5
You should be able to add a new one via:
1. Go to Window > Preferences > Server > Runtime Environments
2. Click on the Add... button
3. Expand the Apache directory to get the list of all Apache servers
4. Select Apache Tomcat v6.0
5. Fill in installation details
If you're not seeing this you might need to check you have the Java EE version of Eclipse and that your installation is up to date.

Debugging a tomcat project in Eclipse 3.4.2

I downloaded eclipse 3.4.2 and tried installing tomcat plugin (version 3.2.1)for eclipse from sysdeo (http://www.eclipsetotale.com/tomcatPlugin.html)
I have followed installation instructions but when is start tomcat from eclipse toolbar i got the following error
java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/SystemLogHandler
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:205)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
I did follow troubleshoot instructions but no success.
I tried to putting plugin in dropin directory too but still got the same error.
This was working fine in eclipse 3.2 and 3.3
Then I tried using standard inbuilt WTP to set up my tomcat server. I am not sure how it will pick my server.xml in conf directory of tomcat, it seems it is not picking as of now.
How do I associate my eclipse project with this setup. I am able to start the server but when i browse the tomcat start page, it does not show anything.
I would appreciate if someone can provide some ways to fix this.
Thanks in advance.
-Dipesh
After trying out few things I was able to debug tomcat project in eclipse 3.4.2
To debug tomcat application/project using eclipse 3.4.2 use WTP plugins which are installed along with it.
Go to Window --> Show View --> Others --> Server
In this view create a new server, please select tomcat installation directory and version information.
Then double click on Tomcat VX.X Server at local host, it opens up configuration settings page
In the Server Locations Section select "Use Tomcat Installation (takes control of Tomcat Installation) and enter deploy path.
In the publishing section select Never Publish automatically and uncheck update context path checkbox.
Voila!! All set to debug tomcat project in eclipse 3.4.2
There is no need to download and copy any extra plugin.
Thanks Juri. Hope this helps.
I'm using Tomcat with Eclipse Java EE version with WTP and it works perfectly. I have Ant scripts which deploy my web app to the tomcat webapp folder. In order to debug, you have to open the Server view in Eclipse, add a new server and choose the correct Tomcat version. Once that's done, open the configuration of Tomcat within eclipse by double-clicking on the server entry in the Eclipse server view you just created. On the left-middle side of the confguration page you should see something like "let Eclipse control the native Tomcat installation", I don't remember the exact text now. You have to choose that. Then you can set a breakpoint in your source code and then start Tomcat in debug mode from within Eclipse's server view.
Hope that helped.
If you are using the Sysdeo plugin, then you don't want to also be using the standard Eclipse WTP servers. To use the Sysdeo plugin, you need to have already downloaded and extracted a standard zipped tomcat directory. Make sure to define CATALINA_HOME in your path. Then, assuming you've correctly installed the sysdeo plugin, go into Eclipse->Windows->Prefs->Tomcat (this is Sysdeo's Tomcat settings, and not the WTP settings). You need to tell the plugin where you've extracted your Tomcat directory, and set it to use Context files.
Now create a new Dynamic web project. Right click it, and go into its properties->Tomcat.
Check it as a 'Tomcat Project'. Give it a context name, and also tell it the directory which would be the base of your war (by default, Eclipse has named this WebContent, I believe). Apply it and close the Window. Right click again your project, and go to the Tomcat section. Add the 'Tomcat Libraries to Build Path' so you can use the Servlet/JSP classes. Finally, click on 'Update Context'. If you go into your Tomcat directory under Conf, you'll see that the plugin has created a context for you that points to your Eclipse workspace. No need for deploying the app to the Tomcat directory. Now, you should be able to click on the Sysdeo Tomcat 'start' button, and your app should be able to connect to your app at localhost:8080/context_name.
HTH,
Bill
Using the excellent Findjar web page for:
org/apache/tomcat/util/log/SystemLogHandler
gives the following:
Information on class org.apache.tomcat.util.log.SystemLogHandler:
Containing JAR files:
jbossweb.jar
gwt-dev-windows.jar
tomcat-util-3.3.2.jar
tomcat-util-4.0.6.jar
tomcat-util-4.1.31.jar
tomcat-util-4.1.34.jar
tomcat-util-4.1.36.jar
tomcat-util-5.0.16.jar
tomcat-util-5.0.18.jar
tomcat-util-5.0.28.jar
tomcat-util-5.5.12.jar
tomcat-util-5.5.15.jar
tomcat-util-5.5.23.jar
tomcat-util-5.5.4.jar
tomcat-util-5.5.7.jar
tomcat-util-5.5.9.jar
tomcat-util-5.5.7-alpha.jar
tomcat-util-5.5.8-alpha.jar
tomcat-util-5.5.9-alpha.jar
Ensure the appropriate jar file is in your CLASSPATH.