Tomcat Startup Error:
When reviewing Java Web, I want to make my workspace cleaner, so I cleaned up the web projects left in the Tomcat installation directory webapps, and double-click start Bat file, the CMD window flashes by, and I feel strange at once. This situation is usually JAVA_Home environment variable is not configured correctly.
Then open start.bat in text mode, add “pause” after the end statement at the end, and double-click start.bat again after saving, the following results appear:
It is found that the paths are correct, indicating that there is no problem with my environment variable configuration.
Open start.bat again as text, call call "%EXECUTABLE%" start %CMD_LINE_ARGS%
statement is changed to run. After saving, double-click start.bat, the following message appears:
A series of errors are shown later, and I only cut one illustratively.
The main information observed is that the sub-container failed to start, and a specified resource set is invalid. The service component necessary Catalina.start fails to start; When you look carefully, you find that it shows an invalid resource set path (at the end of the figure above). You can see that there is no relevant folder under this path.
So I looked at the server.xml file in the conf directory and saw the following configuration (only the code was intercepted):
<Service name="Catalina">
<Engine defaultHost="localhost" name="Catalina">
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Context docBase="E:apache-tomcat-9.0.20webappsSSM" path="/SSM" reloadable="true" source="org.eclipse.jst.jee.server:SSM"/>
<Context docBase="E:apache-tomcat-9.0.20webappsSpring" path="/Spring" reloadable="true" source="org.eclipse.jst.jee.server:Spring"/>
<Context docBase="E:apache-tomcat-9.0.20webappsPressRelease" path="/PressRelease" reloadable="true" source="org.eclipse.jst.jee.server:PressRelease"/>
</Host>
</Engine>
</Service>
In the Context tag, docBase specifies the path of the project, which is accessed through the virtual path path. Because I deleted these three folders together when cleaning the project before, there was an error when Tomcat started.
Delete the contents of the three Context tags in the server.xml file, double-click start.bat after saving, and find that Tomcat has started normally and can access port 8080;
Or create the corresponding SSM, Spring, and PressRelease folders in the webapps directory, and Tomcat can also be started normally.
Read More:
- [Solved] Tomcat Startup Error: A child container failed during start
- [Solved] Tomcat Startup Error: A child container failed during start、LifecycleException: Failed to start component
- [Solved] Docker Startup Error: OCI runtime create failed container_linux.go380 starting container process
- [Solved] Nacos1.3.2 Startup Error: Unable to start embedded Tomcat
- [Solved] nacos Startup Error: Unable to start embedded Tomcat
- Tomcat service startup error: cannot allocate memory [How to Solve]
- [Solved] Tomcat Startup Error: Error deploying web application directory
- [Solved] tomcat Startup Error: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
- [Solved] Nacos Serve Local Startup Error: Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCre
- kafka Environment Build and Startup Error: ERROR [KafkaServer id=1] Fatal error during KafkaServer startup. Prepare to shutdown
- [Solved] kafka startup Error: ERROR Fatal error during KafkaServer startup. Prepare to shutdown
- [Solved] JAVA Web Error: startup failed due to previous errors
- SpringBoot Startup Error: Failed to start component [Connector[HTTP/1.1-8080]]
- [Solved] SpringBoot Startup Error: Description:Web server failed to start. Port 9090 was already in use.(win10)
- [Solved] Spring Boot Startup Error: Failed to load property source from location ‘classpath:/application-dev.yml‘
- Springboot controls the startup of rabbitmq through configuration files
- [Solved] Docker Run Tomcat Error: Cannot find /usr/local/tomcat/bin/setclasspath.sh
- [Solved] Swagger Startup Error: java.lang.NumberFormatException: For input string: ““
- Springboot error about swagger startup [How to Solve]
- [Solved] IDEA springboot Startup Error: java.lang.UnsatisfiedLinkError: no tcnative-1 in java.library.path