码迷,mamicode.com
首页 > 其他好文 > 详细

公司tomcat session问题报错!

时间:2016-09-28 20:02:33      阅读:340      评论:0      收藏:0      [点我收藏+]

标签:公司tomcat session问题报错!

公司测试服务器报错,线上环境没问题。


报错信息:

九月 28, 2016 2:35:57 下午 org.apache.catalina.core.StandardEngine start

信息: Starting Servlet Engine: LengZhiZhu

九月 28, 2016 2:35:57 下午 org.apache.catalina.session.StandardManager doLoad

严重: IOException while loading persisted sessions: java.io.EOFException

java.io.EOFException

at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2325)

at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2794)

at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:801)

at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)

at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)

at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)

at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)

at org.apache.catalina.session.StandardManager.start(StandardManager.java:643)

at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4559)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)

at org.apache.catalina.core.StandardService.start(StandardService.java:519)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:581)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


九月 28, 2016 2:35:57 下午 org.apache.catalina.session.StandardManager start

严重: Exception loading sessions from persistent storage

java.io.EOFException

at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2325)

at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2794)

at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:801)

at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)

at org.apache.catalina.util.CustomObjectInputStream.<init>(CustomObjectInputStream.java:58)

at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)

at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)

at org.apache.catalina.session.StandardManager.start(StandardManager.java:643)

at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4559)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)

at org.apache.catalina.core.StandardService.start(StandardService.java:519)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:581)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


[DEBUG] [2016-09-28 14:35:59] org.apache.ibatis.logging.LogFactory - Logging initialized using ‘class org.apache.ibatis.logging.slf4j.Slf4jImpl‘ adapter.

  九月 28, 2016 2:36:02 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory SpiderCMS

[DEBUG] [2016-09-28 14:36:09] org.apache.ibatis.logging.LogFactory - Logging initialized using ‘class org.apache.ibatis.logging.slf4j.Slf4jImpl‘ adapter.

  [DEBUG] [2016-09-28 14:36:12] org.jboss.logging - Logging Provider: org.jboss.logging.Log4jLoggerProvider

  [INFO ] [2016-09-28 14:36:12] org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 4.3.2.Final

  [DEBUG] [2016-09-28 14:36:12] org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.

  [DEBUG] [2016-09-28 14:36:12] org.hibernate.validator.internal.engine.ConfigurationImpl - Setting custom MessageInterpolator of type org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator

  [DEBUG] [2016-09-28 14:36:12] org.hibernate.validator.internal.engine.ConfigurationImpl - Setting custom ConstraintValidatorFactory of type org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory

  [DEBUG] [2016-09-28 14:36:12] org.hibernate.validator.internal.xml.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.

  [DEBUG] [2016-09-28 14:36:12] org.hibernate.validator.internal.xml.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.

  九月 28, 2016 2:36:13 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory Spider

[DEBUG] [2016-09-28 14:36:14] org.apache.ibatis.logging.LogFactory - Logging initialized using ‘class org.apache.ibatis.logging.slf4j.Slf4jImpl‘ adapter.

  九月 28, 2016 2:36:16 下午 org.apache.coyote.http11.Http11AprProtocol start

信息: Starting Coyote HTTP/1.1 on http-8088

九月 28, 2016 2:36:16 下午 org.apache.coyote.ajp.AjpAprProtocol start

信息: Starting Coyote AJP/1.3 on ajp-8010

九月 28, 2016 2:36:16 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 19652 ms


单独拿出来:

严重: IOException while loading persisted sessions: java.io.EOFException

严重: Exception loading sessions from persistent storage


原因:

错误的原因是:EOFException表示输入过程中意外地到达文件尾或流尾的信号,导致从session中获取数据失败。()

可能由于tomcat上次非正常关闭时有一些活动session被持久化(表现为一些临时文件),在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成的。此异常不影响系统的使用。


解决办法:

清理缓存,将work下面的文件清空,主要是*.ser文件,或者只是删除掉session.ser即可以解决,然后启动服务即可。


本文出自 “renzhiyuan@chinacfsc.com” 博客,请务必保留此出处http://renzhiyuan.blog.51cto.com/10433137/1857350

公司tomcat session问题报错!

标签:公司tomcat session问题报错!

原文地址:http://renzhiyuan.blog.51cto.com/10433137/1857350

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!