org.apache.catalina.core.StandardService - Stopping service [Tomcat]
今天在启动springboot项目突然启动失败,但是在测试日志文件,以为是日志出错,下面这个是logback打印的异常信息。
2019-05-30 15:09:10.686 [restartedMain] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-2} inited
2019-05-30 15:09:10.831 [restartedMain] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-2} closed
2019-05-30 15:09:10.833 [restartedMain] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat]
但其实错误在使用逆向工程时,重复运行导致mapper.xml文件错误。但是logback打印不出这个错误。闪电logback配置文件之后(当然有备份),springboot的默认日志(部分):
2019-05-30 15:19:25.261 INFO 12340 --- [ restartedMain] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2019-05-30 15:19:25.857 INFO 12340 --- [ restartedMain] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
2019-05-30 15:19:26.369 WARN 12340 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [tk/mybatis/mapper/autoconfigure/MapperAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\java\workspace\dbzx-navigate\target\classes\mapper\TxStudentMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.dbzx.mapper.TxStudentMapper.BaseResultMap
2019-05-30 15:19:26.373 INFO 12340 --- [ restartedMain] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed
2019-05-30 15:19:26.378 INFO 12340 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2019-05-30 15:19:26.404 INFO 12340 --- [ restartedMain] utoConfigurationReportLoggingInitializer :
看我标红的地方,这就指向很清晰了,后来发现是因为我在logback配置文件中加了:
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>utf-8</charset>
</encoder>
<!-- 日志级别的配置 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter"><!-- 只打印DEBUG日志 -->
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
日志的配置过滤掉了这个error级别的日志,所以无法显示。
因为之前也查了百度上关于这个异常的信息,出错的地方各不相同,所以还是要仔细查看日志。
org.apache.catalina.core.StandardService - Stopping service [Tomcat]的更多相关文章
- idea tomcat 启动报错 org.apache.catalina.core.StandardService.initInternal Failed to initialize connector
org.apache.catalina.core.StandardService.initInternal Failed to initialize connector org.apache.cata ...
- spring boot 2 内嵌Tomcat Stopping service [Tomcat]
我在使用springboot时,当代码有问题时,发现控制台打印下面信息: Connected to the target VM, address: '127.0.0.1:42091', transpo ...
- SpringCloud启动异常Stopping service [Tomcat]
问题场景: 领导让我搭建一套Jenkins实现自动化部署,项目是SpringCloud项目,配置的过程很顺利,给我提供了一台服务器做部署测试(服务器以前是做dev环境,很长时间没人用了) 我把所有项目 ...
- org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager
1.控制台报错信息 严重: Servlet.service() for servlet [jsp] in context with path [/Resource] threw exception [ ...
- Linux下启动tomcat报错RROR org.apache.catalina.core.StandardContext- Error starting static Resources java.lang.IllegalArgumentException: Document base /home/duiba/apache-tomcat/webapps/../webapps/manager do
部署项目的时候,重启tomcat,死活起不来,很郁闷,网上巴拉了半天,结合自己的情况,找到了原因: 错误日志信息: 2018-12-13 13:52:26,992 [main] INFO org.ap ...
- Tomcat启动错误一例org.apache.catalina.core.StandardContext resources Start Error starting static Resources
org.apache.catalina.core.StandardContext resources Start Error starting static Resources 引发原因:Eclips ...
- tomcat 启动报错(tomcat org.apache.catalina.core.StandardContext startInternal)
转载:https://blog.csdn.net/chenlong316048157/article/details/18698611 org.apache.catalina.core.Standar ...
- 启动Tomcat时报异常org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
之前Tomcat一直运行正常,重启之后一直报以下错误信息: 13-Jun-2019 19:46:13.000 SEVERE [Catalina-startStop-1] org.apache.cata ...
- Tomcat启动问题:严重[main] org.apache.catalina.core.AprLifecycleListener.init An incompatible version...
今天观察tomcat启动日志,有一些以前没注意到的信息: 严重 [main] org.apache.catalina.core.AprLifecycleListener.init An incompa ...
随机推荐
- ABP 后台调用接口 获取返回的数据
原文:https://www.cnblogs.com/i3yuan/p/10703500.html insert 简单测试: public void test8() { string url = &q ...
- 【题解】hdu1506 Largest Rectangle in a Histogram
目录 题目 思路 \(Code\) 题目 Largest Rectangle in a Histogram 思路 单调栈. 不知道怎么描述所以用样例讲一下. 7 2 1 4 5 1 3 3 最大矩形的 ...
- 使用socket.io实现简单的聊天功能
Socket.io实际上是WebSocket的父集,Socket.io封装了WebSocket和轮询等方法 首先得在你的项目中安装socket.io $ npm install socket.io 服 ...
- shell中使用expect命令进行远程执行命令脚本
expect是用来实现自动交互功能的工具之一,使用expect-send来实现交互过程. 注意: 1.脚本的执行方法与bash shell不一样,比如:expect example.sh 2.向一个脚 ...
- Android Studio 之 ROM【2】, LiveData+ViewModel+AsyncTask+Repository
改造上一节 ROM[1], 1.利用 LiveData<List<Word>> 与 observe 中的 onChanged 配合,删除掉之前的textView更新函数(upd ...
- Spring定时任务(@Scheduled)
一.使用Spring的@Scheduled实现定时任务[1] 1.Spring配置文件xmlns加入 xmlns:task="http://www.springframework.org/s ...
- 【计算机视觉】【ARM-Linux开发】Ubuntu14.04下安装opencv3(anaconda3 Python3.6)
首先附上一个stackoverflow上看到的问题:https://stackoverflow.com/questions/38787748/installing-opencv-3-1-with-an ...
- python项目文件夹
项目的文件夹 conf 用于存放配置文件的文件夹 core 核心业务代码 .py interface 接口, 接口内写获取数据前的逻辑代码,通过后才能获取数据 db 目前我们用于存放文件信息的 lib ...
- 避免maven package 打包时执行 mybatis-generator-maven-plugin 插件
一.为什么打包时会执行该插件mybatis-generator-maven-plugin默认绑定了package的生命周期 二.如何解决如果在package和install 执行插件,修改pom中的配 ...
- 使用scrapy框架做武林中文网的爬虫
一.安装 首先scrapy的安装之前需要安装这个模块:wheel.lxml.Twisted.pywin32,最后在安装scrapy pip install wheel pip install lxml ...