Michael Allen
Michael Allen

Reputation: 5828

Connecting Tomcat server to Eclipse

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?

Upvotes: 13

Views: 63368

Answers (12)

Nikos Stais
Nikos Stais

Reputation: 116

If you have unzipped downloaded Tomcat archive into Eclipse Servers folder, User Entries in classpath have relative path (e.g. /Servers/....) of bootstrap.jar and tomcat-juli.jar which path I guess is not accessible as a relative path.

Once I removed Tomcat installation directory (with files) outside Eclipse's Servers folder, delete the old configuration and re-add Tomcat, everything worked as expected.

I hope this helps narrow down the cause.

Upvotes: 0

Rajesh
Rajesh

Reputation: 1

same problem in my case also i solved::

just remove your older tomacat server and add tomcat 8.0 version only

Upvotes: 0

Witold Kaczurba
Witold Kaczurba

Reputation: 10495

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.

Upvotes: 3

Sohan Nipunage
Sohan Nipunage

Reputation: 131

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!

Upvotes: 3

Enosh
Enosh

Reputation: 269

You can try as below steps:

  1. Open Window -> Preferences -> Server -> Runtime Environments
  2. Click add button, choose the what's kind of server you use.
  3. Click next button, give a name to your runtime server and the path of tomcat.
  4. New a new server with the new created runtime server

Upvotes: 0

Seif Tml
Seif Tml

Reputation: 2423

this could happen if you probably used previous tomcat server in eclipse, so deleting server and its configuration and creating another one will make it work .

Upvotes: 0

suji
suji

Reputation: 11

I have faced the same problem.

Solution: In Project Explorer--> Servers(right click) --> Run As --> Run Configurations(click) --> (Select "Tomcat v7.0 Server at localhost") --> Arguments(tab) --> Working directory(bottom of window) --> others : (click workspace) --> select the "boostraps.jar" from -->Server.

Eg., My workspace.MY path is:

Project Explorer --> Servers(right click) --> Run As --> Run Configurations(click) --> (Select "Tomcat v7.0 Server at localhost") --> Arguments(tab) --> Working directory(bottom of window) --> others : (click workspace) --> /home/ciprus//Servers --> click apply.

Upvotes: 1

javaguy
javaguy

Reputation: 1133

I was also facing same issue and solved it as follows : My conclusions : 1) In my case issue was coming as I shifted the location of the Tomcat. Solution : 2) double clicked on the server configured in the eclipse. 3) Click on Open Launch configuration. 4) Change the classpath under classpath tab to the new location.

Hope this would help.

Upvotes: 1

Nobbynob Littlun
Nobbynob Littlun

Reputation: 381

I googled my way here on the search terms, "the specified tomcat directory does not exist". (I had moved it from one directory to another.)

For others here for that reason, my solution was to go into Window -> Preferences -> Server -> Runtime Environments and update it there. Then to update the JARs, as in Marcin Wasiluk's answer.

Upvotes: 1

Peiqin
Peiqin

Reputation: 388

Or you may delete the servers configuration, and configure the server again. This works when you may have changed the directory of the server.

Upvotes: 1

Michael Allen
Michael Allen

Reputation: 5828

The trick here was that the location of the jar was inside the Eclipse/STS project directory. STS stores its server configurations inside the /Servers folder and I had decided to store the tomcat runtimes here as well for neatness. Placing the runtimes elsewhere and trying again solves this issue.

Upvotes: 6

Marcin Wasiluk
Marcin Wasiluk

Reputation: 4864

You might want to check/manually edit your path by going into server properities:

In Servers view,

1) double-click on Tomcat server.

2) Then click on Overview of Tomcat settings appears.

3) "Open launch configuration" then Classpath

4) Edit User Entries here

Upvotes: 30

Related Questions