11

I see that problems like mine have been posted before, some of which posts were answered. I've attempted the fixes, which indeed seem like they should have worked, but I'm still running into the same problem:

I'm trying to run a dynamic web project in Eclipse Kepler (Java EE) via apache tomcat 7.0.53 on my localhost. I've created tomcat as a server in Eclipse, and copied the config files from /tomcat/7.0.53/libexec/conf into /workspace/Servers/Tomcat v7.0 Server at localhost-config, and changed the permissions on the files so that they are all readable and writeable.

However, when I try to start the tomcat server in eclipse, I get this error:

Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.

In case it's helpful, it's all being run in mac osx 10.6.8, on a 64-bit machine.

Thanks in advance for your help.

Ian Riley
  • 457
  • 2
  • 8
  • 17

10 Answers10

35

I am facing this issue. I have fixed as following way,

Step 1: Delete server at local host(Server tab)

Step 2: Delete Servers folder in (navigator/project explorer)

Step 3: After add New->server->Apache->choose path

Step 4: start the server

After it will work......

4

How to solve:

1.Close Eclipse

2.Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0.53 Server at localhost-config

3.Start Eclipse

4.Expand the Servers project, click on the Tomcat 7 project and hit F5

5.Start Tomcat from Eclipse

ROOT
  • 1,757
  • 4
  • 34
  • 60
2

Go to Server --> Apache Tomcat v7.0 --> Add Select jre7 instead of Workbench default JRE Click on Finish Stop Server and then Start Server

1

This is a permissions problem (I had the same issue in ubuntu 14.04, eclipse luna, tomcat7). The executable files are not marked as "executable" when tomcat is donwloaded from eclipse.

Just go to your "[tomcat]/bin" directory in your file system and add execution permission (x) to all .sh files. Then go back to eclipse/servers tab, delete the tomcat7 entry an create again, finally start tomcat from eclipse.

angelito
  • 412
  • 4
  • 10
0

This same problem happened to me before then i got solution for config load error:

it can be solved Right click on Project-> Build Path-> Configure Build Path->go Library tab-> Add External Jar-> browse (Apache TomCat Folder->lib->and add servlet-api.jar) add click ok. it run fine for me.

Raju Sharma
  • 2,496
  • 3
  • 23
  • 41
  • Thanks Raju, That's a good point. I hadn't added that .jar to the buildpath - however the project still isn't running. I'll try building a project from scratch and see if it works. – Ian Riley Apr 12 '14 at 00:24
  • Yes please try and tell, this happened me before and i tried it to solve using this only, sometimes server failed to load this jar file. – Raju Sharma Apr 12 '14 at 01:11
0

Unfortunately, this is not much of an answer. I finally never got this working with eclipse Kepler. However, when I installed linux mint on my computer, and used its software installer to install linux 3.8 (indigo), added all the EE updates (all the web/xml additions via help-->install new software-->indigo update site), installed tomcat 7.0, I finally got eclipse to play nice with tomcat (that is, I can run the webapp on tomcat from eclipse, without copy/pasting all the requisite files into tomcat, which is saving me a boatload of time).

I'm sure there is a better way to do this - if anyone has any thoughts about what may have gone wrong in my initial environment, please advise - I'm curious why it didn't work. Here were the specs:

MacOS 10.6.8 Eclipse 4.3.2 Tomcat 7.0.54

My apologies, Raju, for not responding sooner. Thanks for your post.

Ian Riley
  • 457
  • 2
  • 8
  • 17
0

How to solve:

Close Eclipse Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0 Server at localhost-config Start Eclipse Expand the Servers project, click on the Tomcat 7 project and hit F5 Start Tomcat from Eclipse

0

I found that this is a good old fashion directory naming convention problem. I'm running Linux Ubuntu and noticed that right under {your work space}/Servers there appeared a strange error type file when I opened it had all kinds of chunks of the crazy long directory name "Tomcat 7.0 Server... bla bla" So I deleted the Server, then made use of this little ditty cause my version also won't let me re-add the server again: 1. Close Eclipse 2. 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 3. Restart Eclipse

Then I re-added the server using a friendlier server name without any crazy spaces or chars: Tomcat7ServerAtLocalHost

The wella... it started with a brand new error for me to debug... which means I'm on the right track... BTW, the new error is: "Cannot publish to the server because it is missing its runtime environment."

So I'm off to debug that mess... Cheers!

0

This problem is mostly associated with file permissions. So the best way to solve the problem is to install a local copy of Tomcat on your development machine instead of putting Tomcat in a system directory such as /usr/share/tomcat7. This way all Tomcat conf files belong to the user and user group so that it can be run from Eclipse by the user. I normally place Tomcat at my local folder such as /home/abc/dev and it works perfectly with Eclipse development environment.

tonga
  • 11,749
  • 25
  • 75
  • 96
0

For me the only solution that works is this solution suggested here: Could not load the Tomcat server configuration

cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /var/log/tomcat7 log
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R a+rwx /usr/share/tomcat7/conf
Community
  • 1
  • 1