Tomcat v7.0 stopped to run my project at localhost

前端 未结 8 1599
醉话见心
醉话见心 2021-01-05 11:50

I was working on my web application in eclipse with Tomcat v7.0, and everything was fine.
But today suddenly I can\'t run my poject on server anymore.
I do as usual:

相关标签:
8条回答
  • 2021-01-05 11:56

    I solved this by deleting the working directory of my Tomcat server, cleaning, and republishing. For reference, my working directory was:

    {eclipse-workspace}/.metadata/.plugins/org.eclipse.wst.server.core
    

    And my server was tmp0. I've seen other people have servers under different directories. I found this path after double clicking on the Tomcat server in eclipse. That brings up a configuration menu and it lists the "Server Location".

    0 讨论(0)
  • 2021-01-05 12:06

    In my case it was due to a BSOD during the deploy procedure. I had a couple of corrupted files (in Tomcat config) in the destination tomcat, so eclipse could not parse them to check if a redeploy was needed.

    0 讨论(0)
  • 2021-01-05 12:07

    Download and install the zip file of tomcat instead of 32 bit windows zip and 64 bit windows zip. Add it to server- Window->Pref->Server->Runtime Env

    Download link

    Apache Tomcat download page https://tomcat.apache.org/download-70.cgi

    0 讨论(0)
  • 2021-01-05 12:09

    Also you can remove these files:

    org.eclipse.wst.server.core.prefs
    org.eclipse.jst.server.tomcat.core.prefs
    

    from $your_path/workspaceEclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings

    and make new server again.

    0 讨论(0)
  • 2021-01-05 12:14

    In my case, when I had same issue I understood that I previously commented out the Host node with name="localhost" in server.xml.

    Example:

    <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"></Host>
    

    And since then I was getting this Exception each time I tried to publish changes to Tomcat.

    But the problem is, when I opened server.xml in eclipse and I removed comment brackets from this Host, saved changes and tried o publish again, I was still getting this Exception. Restarting Eclipse, deleting tmp0 folder in C:\src\trunk.metadata.plugins\org.eclipse.wst.server.core did not help.

    What helped is openning server.xml in other than Eclipse editor. It is appeared that this Host stayed commented out in it, so Eclipse did not actually apply changes unless publishing is successfull. So I removed comment brackets from this Host in other text editor, saved changes, returned to Eclipse and publishing worked again!

    Hope it will help to somebody.

    0 讨论(0)
  • 2021-01-05 12:21

    I had similar problem, but java.lang.NullPointerException instead.

    For me the only thing that worked was to:

    1. Right-click on server instance on servers view -> Properties -> Switch Location;
    2. Remove all published projects from server;
    3. Right click on server again and do both cleans.

    Hope that helps!

    0 讨论(0)
提交回复
热议问题