Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting Tomcat server to Eclipse

Tags:

eclipse

tomcat

I am trying to use Tomcat 6.0 as a web development server within SpringSource Tool Suite 2.7.1. I create a runtime, download tomcat, create a server, etc as per these instructions http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/index.html#N10148

When I try to run a web app on the server though I get the following error:

The archive: /Servers/Tomcat/bin/bootstrap.jar which is referenced 
by the classpath, does not exist.

I know this bootstrap.jar file does exist in the exact place it says it should be yet it still causes an error. Any ideas?

like image 679
Michael Allen Avatar asked Jul 27 '11 14:07

Michael Allen


People also ask

How can I add Tomcat server to Eclipse?

Installing server runtime Start the Eclipse WTP workbench. Open Window -> Preferences -> Server -> Installed Runtimes to create a Tomcat installed runtime. Click on Add... to open the New Server Runtime dialog, then select your runtime under Apache (Apache Tomcat v5. 0 in this example):

Where is Tomcat server in Eclipse?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.


2 Answers

None of the above answers provide proper concrete solution. I faced exactly same issue and i figured out a very simple solution.

  • Open Eclipse and remove all entries of Apache server

  • Delete Servers from explorer tab, delete Tomcat from server explorer window, delete server from Window > Preferences > Server > Apache tomcat, delete it, also delete servers folder inside EclipseProjects.

  • Place Apache tomcat folder outside the project folder anywhere you wish to, you can place in Eclipse_Projects folder but not inside EclipseProjects/projectxyz/.

  • Now add server in eclipse the usual way and give path of this new location.

This should work!

like image 104
Sohan Nipunage Avatar answered Sep 30 '22 08:09

Sohan Nipunage


I had similar issue. This is what worked for me:

  1. When the path begins with slash like: "/Servers/Tomcat/bin/bootstrap.jar" it means that the local project is refered. In the picture - I had 'pivotal-tc-server-developer-3.2.8.RELEASE' as the name of the project.

enter image description here

  1. Open the project ('Servers' in your case or 'pivotal-tc-server-developer-3.2.8.RELEASE') so it is accessible to Eclipse.

  2. The jar should be now visible.

Alternatively go into Run Configurations; delete jars, and add it as an external jar.

like image 40
Witold Kaczurba Avatar answered Sep 30 '22 10:09

Witold Kaczurba