main 方法体:
// -Dserver.port=$PORT
SpringApplication app = new SpringApplication(AdminApplication.class);
app.setWebEnvironment(true);
app.setShowBanner(false);
Set<Object> set = new HashSet<Object>();
app.setSources(set);
app.run(args);
下面是报错信息:
11:39:27.378 [main] INFO o.i.a.application.AdminApplication - Starting AdminApplication on WeiSky with PID 4752 (D:\_springMVC4\bigdataframe\demos\test-admin\target\classes started by Administrator in D:\_springMVC4\bigdataframe\demos\test-admin)
11:39:29.481 [Tomcat-startStop-1] ERROR o.apache.catalina.core.ContainerBase - A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.7.0_60]
at java.util.concurrent.FutureTask.get(FutureTask.java:188) [na:1.7.0_60]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.54.jar:7.0.54]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) [tomcat-embed-core-7.0.54.jar:7.0.54]
... 6 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.addServlet(Ljava/lang/String;Ljavax/servlet/Servlet;)Ljavax/servlet/ServletRegistration$Dynamic;
at org.springframework.boot.context.embedded.ServletRegistrationBean.onStartup(ServletRegistrationBean.java:166) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:214) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.ServletContextInitializerLifecycleListener.lifecycleEvent(ServletContextInitializerLifecycleListener.java:63) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
... 6 common frames omitted
11:39:29.482 [main] ERROR o.apache.catalina.core.ContainerBase - A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_60]
at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_60]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:289) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:146) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) [spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.itboys.admin.application.AdminApplication.main(AdminApplication.java:24) [classes/:na]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_60]
at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_60]
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
... 6 common frames omitted
11:39:29.510 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:135) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.itboys.admin.application.AdminApplication.main(AdminApplication.java:24) [classes/:na]
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:116) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:289) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:146) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
... 5 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79) ~[spring-boot-1.1.3.RELEASE.jar:1.1.3.RELEASE]
... 10 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
... 12 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
... 14 common frames omitted
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-7.0.54.jar:7.0.54]
... 16 common frames omitted
Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:135)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
at org.itboys.admin.application.AdminApplication.main(AdminApplication.java:24)
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:116)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:289)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:146)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
... 5 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79)
... 10 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 12 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 14 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 16 more
相关推荐
【SSMmaven+mysql8.0+tomcat9+eclipse2023最新版】是一个集成开发环境的配置组合,主要用于Java Web应用程序的开发。这个组合包含了四个关键组件: 1. **Spring框架**:Spring是Java企业级应用开发中最广泛使用的...
毕业设计,基于Springboot+Mybatis+mysql开发的客户关系管理系统,内含...运行Application类的main函数 or java -jar SpringbootCRM-0.0.1-SNAPSHOT.jar 项目访问路径:http://localhost:8080/ 账号密码:admin/123456
4. **配置Tomcat**:如果需要部署到Tomcat,需要在`pom.xml`中添加Tomcat的插件配置,如`tomcat7-maven-plugin`或`tomcat8-maven-plugin`,并指定服务器的相关设置。 5. **运行与测试**:使用Maven命令(如`mvn ...
4.找到DiemsApplication,并找到main函数,右击run DiemsApplication即可 5.项目跑起来之后,在浏览器访问网址:http://localhost:8080/login.html 6.客户和员工对应数据库表t_customers和t_employees表,...
在IT行业中,构建Java项目通常会借助集成开发环境(IDE),如IntelliJ IDEA,而Maven是管理项目依赖和构建的重要工具。本项目显然基于IntelliJ IDEA使用Maven来构建,确保了项目的模块化和可维护性。让我们深入探讨...
4.找到DiemsApplication,并找到main函数,右击run DiemsApplication即可 5.项目跑起来之后,在浏览器访问网址:http://localhost:8080/login.html 6.客户和员工对应数据库表t_customers和t_employees表,用户名...
4.找到DiemsApplication,并找到main函数,右击run DiemsApplication即可 5.项目跑起来之后,在浏览器访问网址:http://localhost:8080/login.html 6.客户和员工对应数据库表t_customers和t_employees表,用户名...
- src/main/java:Java源代码,包括SpringBoot的主应用类、配置文件、业务逻辑和DAO层。 - src/main/resources:配置文件,如application.properties、数据库连接配置等。 - src/main/static:存放静态资源,如CSS、...
pom.xml是Maven项目对象模型(Project Object Model)的配置文件,用于定义项目的依赖、插件和其他构建设置。在SpringBoot项目中,pom.xml用于声明SpringBoot起步依赖、SpringData JPA、Scala库、MySQL驱动等相关...
它定义了一组用于在Java中执行SQL语句、处理结果集和管理数据库连接的类和接口。当你需要在Java应用中访问MySQL数据库时,你需要将`mysql-connector-java-8.0.9.jar`这个JDBC驱动添加到你的项目类路径中。这样,Java...
- `src/main/java`:存放Java源代码文件。 - `src/main/resources`:配置文件、数据库脚本等。 - `src/main/webapp`:存放Web相关的HTML、CSS、JS等静态资源。 - `pom.xml`:Maven配置文件。 - `README.md`:...
- `pom.xml`: Maven的项目对象模型配置文件,定义了项目依赖、插件和构建过程。 - `src/main/java`: 存放Java源代码,包括Spring配置、SpringMVC控制器、MyBatis的Mapper接口和实体类等。 - `src/main/resources`: ...
- **Lambda表达式支持**:使得Java代码更加简洁,更符合函数式编程风格。 3. **项目搭建步骤**: - **创建Spring Boot项目**:使用Spring Initializr生成基础项目结构,选择需要的依赖(如web、mybatis、mybatis-...
MavenWebApp2项目遵循Maven的默认目录结构,包括`src/main/java`(存放Java源代码)、`src/main/resources`(存放配置文件和静态资源)、`src/main/webapp`(存放JSP、CSS、JavaScript等Web应用资源)以及`src/test...
【JavaBean】:JavaBean是符合特定规范的Java类,通常具有默认构造函数、getter和setter方法,以及封装的数据属性。在Java Web应用中,JavaBean常被用来作为数据模型,存储和管理新生的相关信息,如姓名、学号、专业...
IDEA开发,JAVA编写,SSM框架 包管理使用Maven 采用Tomcat9.0.45服务器 数据库采用Mysql,可通过根目录下的.sql文件一键导入 前端部分使用axis上传合同签名 其余则是正常的bootstrap前端模板框架 使用方法 git ...
这是一个基于Vue3和Java开发的通用管理系统的源代码包,名为"lingxi-main"。这个系统可能被设计为一个后台管理平台,适用于多种业务场景,如企业内部的资源管理、用户管理、数据统计等。接下来,我们将深入探讨Vue3...
5. **项目结构**:一个典型的Spring MVC Maven项目结构包括`src/main/java`(存放源代码)、`src/main/resources`(存放配置文件和静态资源)、`src/main/webapp/WEB-INF`(存放`web.xml`配置文件)等。 6. **配置...
- **使用 Spring Boot Maven 插件**: Spring Boot 提供了一个专门的 Maven 插件来简化构建过程。 - **Gradle** - **Ant** - **Starter 依赖**: Starter 依赖是 Spring Boot 为简化依赖管理而提供的。 - **组织...
在名为“springboot-master”的压缩包中,可能包含了一个完整的Spring Boot项目结构,包括pom.xml(Maven的配置文件)、src/main/java(源代码目录)、src/main/resources(资源配置文件)等。开发者可以通过导入这...