spring boot报Stopping service [Tomcat]

springboot 启动,Tomcat意外停止了,提示Stopping service [Tomcat],详细信息如下
在这里插入图片描述
这里面并没有什么有用的提示信息;引发这个异常的原因有很多;比较通用的解决办法就是让它多打印一些信息出来排除错误。

  1. 在resources目录加入log4j.properties,文件内容如下
log4j.rootLogger=INFO, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  1. 如果没有log4j的依赖,记得添加依赖
<dependency>
 	<groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>

3.启动程序,可以看到了一堆报错信息;xml中resultMap值写错了。

在这里插入图片描述
在这里插入图片描述

org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
	at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:346)
	at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:290)
	at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:109)
	at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:788)
	at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:758)
	at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:753)
	at org.apache.ibatis.binding.MapperMethod$SqlCommand.resolveMappedStatement(MapperMethod.java:249)
	at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:219)
	at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:49)
	at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)
	at com.sun.proxy.$Proxy190.getScheduleList(Unknown Source)
	at com.zscloud.cloud.look.server.config.SchedulingConfig.configureTasks(SchedulingConfig.java:39)
	at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:226)
	at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:211)
	at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:102)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
	at com.zscloud.cloud.look.server.CloudLookServerApplication.main(CloudLookServerApplication.java:89)
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.util.HashMap
	at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:888)
	at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:640)
	at org.apache.ibatis.builder.MapperBuilderAssistant.getStatementResultMaps(MapperBuilderAssistant.java:344)
	... 30 more

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
# Author: Greg Lee Turnquist # Paperback: 264 pages # Publisher: Packt Publishing; 1st New edition edition (May 21, 2010) # Language: English # ISBN-10: 1849510660 # ISBN-13: 978-1849510660 Amazon 的介紹: http://www.amazon.com/Spring-Python-1-1-Greg-Turnquist/dp/1849510660 Spring Python captures the concepts of the Spring Framework and Spring Security and brings them to the world of Python and provides many functional parts to assemble applications. Spring Python is all about using the many useful features of Spring to the fullest and making these features available when working with Python. Get to grips with all of the concepts of Spring and apply these to the language and environment of Python to develop powerful applications for your own personal requirements. The book provides an introduction to Spring Python and steadily takes you towards the advanced features that this integration has to offer. Spring uses the Java programming language. Spring Python, the first Spring extension to go live, allows developers to make maximum use of Spring features in Python. This book starts off by introducing each of the core building blocks of Spring Python using real code examples and high-level diagrams. It explores the various concepts of Spring Python with the help of examples and case studies and focuses on vital Spring Python features to make the lives of Python and Java developers simple. The early chapters cover simple applications with simple operations including data access, and then subsequent chapters scale up to multi-node, secured, transactional applications stopping short of very advanced level complexity. This book will help you to scale your applications without having to add unnecessary complexity
1. Getting Started with Tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Installing Tomcat 1 Starting, Stopping, and Restarting Tomcat 17 Automatic Startup 29 Testing Your Tomcat Installation 34 Where Did Tomcat Come From? 35 2. Configuring Tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 A Word About Using the Apache Web Server 38 Relocating the Web Applications Directory 39 Changing the Port Number from 8080 42 Java VM Configuration 51 Changing the JSP Compiler 54 Managing Realms, Roles, and Users 55 Controlling Sessions 70 Accessing JNDI and JDBC Resources 75 Servlet Auto-Reloading 78 Customized User Directories 78 Tomcat Example Applications 80 Common Gateway Interface (CGI) 80 The Tomcat Admin Webapp 82 3. Deploying Servlet and JSP Web Applications in Tomcat . . . . . . . . . . . . . . . . . 86 Layout of a Web Application 93 Deploying an Unpacked Webapp Directory 95 Deploying a WAR File 100 Hot Deployment 106 Working with WAR Files 107 The Manager Webapp 108 Automation with Apache Ant 111 Symbolic Links 124 4. Tomcat Performance Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Measuring Web Server Performance 127 External Tuning 153 Internal Tuning 156 Capacity Planning 164 Additional Resources 167 5. Integration with the Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 The Pros and Cons of Integration 170 Installing Apache Apache Integration with Tomcat 177 Tomcat Serving HTTP over the APR Connector 194 6. Tomcat Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 Securing the System 202 Multiple Server Security Models 204 Using the SecurityManager 205 Granting File Permissions 208 Setting Up a Tomcat chroot Jail 213 Filtering Bad User Input 224 Securing Tomcat with SSL 241 7. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 server.xml 260 web.xml 316 tomcat-users.xml 333 catalina.policy 333 catalina.properties 334 context.xml 335 8. Debugging and Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Reading Logfiles 336 Hunting for Errors 337 URLs and the HTTP Conversation 337 Debugging with RequestDumperValve 342 When Tomcat Won’t Shut Down 343 9. Building Tomcat from Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Installing Apache Ant 348 Obtaining the Source 349 Downloading Support Libraries 351 Building Tomcat 352 10. Tomcat Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 Clustering Terms 355 The Communication Sequence of an HTTP Request 356 Distributed Java Servlet Containers 366 Tomcat 6 Clustering Implementation 370 JDBC Request Distribution and Failover 388 Additional Resources 389 11. Final Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Supplemental Resources 391 Community 395 A. Installing Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 B. jbchroot.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 C. BadInputValve.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 D. BadInputFilter.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 E. RPM Package Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值