Home > OS >  Server apache-tomcat-9.0.55 at localhost failed to start -- maven eclipse project
Server apache-tomcat-9.0.55 at localhost failed to start -- maven eclipse project

Time:12-06

I am working on a Maven Project on Eclipse and need apache tomcat to run the application on a server. For some reason, it is not working for me and I get an error that says "Server apache-tomcat-9.0.55 at localhost failed to start.". This happened to me yesterday but I just right clicked on the server section and added the same server again and it worked. This is not working anymore. I have attached photos of my library, build path, preferences, and the error message. Below is my pom.xml file.

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.prog</groupId>
  <artifactId>sampleApp</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>sampleApp Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
  <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
    <scope>provided</scope>
</dependency>

 <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <version>8.0.13</version>
</dependency>

  
  <dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>jstl</artifactId>
  <version>1.2</version>
  </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
  <plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>3.3.1</version>
</plugin>
  </plugins>
    <finalName>sampleApp</finalName>
  </build>
</project>

Any help at all would be extremely appreciated. I really have no idea what else to try. I've been working on this for several hours now and have made no progress after watching dozens of videos. Thank you so much for your time.

enter image description here enter image description here enter image description here enter image description here

CodePudding user response:

You may want to check this website: https://websparrow.org/misc/server-tomcat-server-at-localhost-failed-to-start-in-eclipse

On this page, you will get the complete solution to how to resolve Tomcat Server at localhost failed to start.

Basically, there are three ways.

Solution 1:

1-Go to your workspace directory » .metadata » .plugins » org.eclipse.core.resources folder.

2- Delete the .snap file.

3- Restart your Eclipse IDE.

Solution 2:

1- Open the Servers tab from Windows » Show View » Servers menu.

2- Right click on the server and delete it

3-Create a new server by going New » Server on server tab.

4-Click on Configure runtime environments link.

5-Select the Apache Tomcat Server and remove it. This will remove the Tomcat server configuration.

6-Click on OK and exit the screen above now.

7-From the screen below, choose Apache Tomcat server and click on Next button:

8-Browse to Tomcat Installation Directory.

9-Click on Next and choose which project you would like to deploy:

10-Click on Finish after adding your project.

11-Now launch your Server.

Solution 3:

1-Go to your workspace directory » .metadata » .plugins » org.eclipse.wst.server.core folder.

2- Delete the tmp folder.

3- Restart your Eclipse IDE

  • Related