1、 Background description
Project architecture: spring boot (v2.0.0. Release) + mybatis plus (v3.1.1)
Today, I developed a new function on an old project (running normally). Before adding new functions, the project started and ran normally. As a result, after the development, the project couldn’t start and the background didn’t report any error information. The key is that I didn’t even have a log. For a moment, I couldn’t start it.
2、 Cause analysis
According to the situation analysis, the project can’t be started. Thinking that there must be a problem in starting, a try… Catch… Block is added to the line of starting the project in the starting class (that is, the following code plus).
SpringApplication.run(DailyApplication.class, args);
See if there is an error log.
@Slf4j
@EnableScheduling
@EnableFeignClients(basePackages = "com.iot")
@SpringBootApplication(scanBasePackages={"com.iot"})
@MapperScan({"com.iot.daily.*.dao"})
public class DailyApplication implements ApplicationRunner {
public static void main(String[] args) {
try {
SpringApplication.run(DailyApplication.class, args);
} catch (Exception e) {
e.printStackTrace();
log.error("error: ============== ", e);
}
}
@Override
public void run(ApplicationArguments args) throws Exception {
log.info("The daily report system was successfully launched!......");
}
}
Start the project, and then, as expected, the console displays the error log with the following error message:
Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
The specific error information will be supplemented later, but now it can’t be reproduced.
3、 Solutions
Here is my project solution, very simple, Maven clean once, and then restart.
end!
Read More:
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is
- [Solved] Upload Files Error: Request processing failed;nested exception is org.springframework.web.multipart.MultipartExcepti
- [Solved] Web server failed to start. Port 8080 was already in use.
- [Solved] SpringBoot Startup Error: Description:Web server failed to start. Port 9090 was already in use.(win10)
- [Solved] Maven Project Error: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- [Solved] Error creating bean with name ‘org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0‘:
- [Solved] ApiPost Error: org.springframework.web.multipart.MultipartException
- [Solved] JSONUtil.toJsonStr() Error: org.springframework.web.util.NestedServletException: Handler dispatch failed…
- [Solved] ‘build.plugins.plugin.version‘ for org.springframework.boot:spring-boot-maven-plugin is missing.
- [Solved] Failed to start bean ‘eurekaAutoServiceRegistration‘; nested exception is java.lang.NullPointerExce
- [Solved] SSM startup error: ClassNotFoundException: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- [Solved] org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a
- [Solved] swagger Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullP
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPointerEx
- [Solved] SpringBoot Startup Error: Unable to start LiveReload server
- Springcloud Project Error: web.client.HttpServerErrorException$InternalServerError: 500 Internal Server Error
- [Solved] nested exception is org.flowable.common.engine.api.FlowableException: Error initialising dmn data mo