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 ...
随机推荐
- selenium--高亮显示正在操作的元素
前戏 在进行web自动化的时候,如果我们想知道正在操作的元素,我们可以通过js的方式来实现 实战 from selenium import webdriver import unittest, tim ...
- 【LG5504】[JSOI2011]柠檬
[LG5504][JSOI2011]柠檬 题面 洛谷 题解 考虑\(dp\),令\(f_i\)表示\(dp\)到第\(i\)位且在第\(i\)位分段的最大值. 我们令题面中的\(s_i\)为\(a_i ...
- ipv6转ipv4 NAT64与DNS64基本原理概述
原文: https://blog.csdn.net/zhangjie1989/article/details/51464251 1.NAT64与 DNS64背景 在 IPv6网络的发展过程中,面临最大 ...
- NIO (一) NIO是什么
参考文档:java为什么需要NIO:https://liuchi.coding.me/2017/08/01/浅谈Java为什么需要NIO/美团技术团队 NIO浅析:https://tech.meitu ...
- java基础 JDBC & Statement & PreparedStatement
参考文章: http://blog.csdn.net/wang379275614/article/details/23393335 概念 JDBC-数据库连接,是由一些类和接口构成的API,是J2SE ...
- DDD(Domain Driven Design) 架构设计
一.为什么要分层 分层架构是所有架构的鼻祖,分层的作用就是隔离,不过,我们有时候有个误解,就是把层和程序集对应起来,就比如简单三层架构中,在你的解决方案中,一般会有三个程序集项目:XXUI.dll.X ...
- 【2019年05月20日】A股滚动市盈率PE历史新低排名
2010年01月01日 到 2019年05月20日 之间,滚动市盈率历史新低排名. 上市三年以上的公司, 2019年05月20日市盈率在300以下的公司. 1 - 阳光照明(SH600261) - 历 ...
- Visual Studio报错/plugin.vs.js,行:1074,错误:缺少标识符、字符串或数字
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies/plugin. ...
- flume到flume消息传递
环境:两台虚拟机( 每台都有flume) 第一台slave作为消息的产生者 第二台master作为消息的接收者 IP(192.168.83.133) 原理:通过监听slave中文件的变化,获取变 ...
- mysql启动报错 "unknown variable 'defaults-file=/etc/my.cnf"
使用指定的my.cnf,而不用默认的/etc/my.cnf文件,可以在启动时,在mysqld_safe后加上参数--default-file=/usr/local/server/mysql2/etc/ ...