您的位置:首页 > 运维架构 > Tomcat

[架构师之路]TOMCAT启动出错

2017-07-23 17:28 211 查看
1.看tomcat错误日记

  报错信息:StandardContext.startInternal One or more listeners failed to start. Full details will be found in t

  在项目的WEB-INF/classes目录下新建一个文件叫logging.properties,内容如下

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = error-debug.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


重新启动tomcat,便可以在tomcat的logs目录下生产error开头的错误日记。

2.java.lang.IncompatibleClassChangeError: Class org.springframework.core.type.classreading.AnnotationMetadataReadingVisitor

原因是jar包冲突引起的。

spring-core.jar包里已经有了asm

固不用单独导入asm包

方案一:全部的spring引用换成3.4.2;这个版本里面core 有as-common文件夹

3.
http://www.imooc.com/wenda/detail/317567
把“,”变成"#"就可以解决

4. 


The valid characters are defined in RFC 7230 and RFC 3986 错误

http://blog.csdn.net/sunpeng_sp/article/details/58309190

5.项目在war打包后,jetty单元测试总是报下面的错误

--------------------------------------------------------------------------------------------------

HTTP ERROR 500

Problem accessing /customer/customer/toList. Reason: 

    Server Error

Caused by:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sishuok.architecture1.customermgr.dao.CustomerDAO.getByConditionPage
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:184)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:38)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:49)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:42)
at com.sun.proxy.$Proxy31.getByConditionPage(Unknown Source)
at com.sishuok.architecture1.common.service.BaseService.getByConditionPage(BaseService.java:37)
at com.sishuok.architecture1.customermgr.web.CustomerController.toList(CustomerController.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

-------------------------------------------------------------------------------------------------------

进过一个星期的调查调试发现在target下的map文件没有生产导致,不能映射出错;

终于找到该处错误,太开心了;被折磨好一阵子。

接下来看为啥有时候能生成的问题

6.maven的主项目和子模块在clean后,如果直接运行子模块会出现莫名的报错,

这时必须把项目用maven 强制update,错误就可以消失
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: