zoukankan      html  css  js  c++  java
  • 启动Tomcat的时候遇到错误

    严重: IOException while loading persisted sessions: java.io.EOFException
    java.io.EOFException
    	at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    	at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
    	at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    	at java.io.ObjectInputStream.<init>(Unknown Source)
    	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.addChildInternal(ContainerBase.java:791)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
    	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    	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(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2011-7-13 14:38:13 org.apache.catalina.session.StandardManager start
    严重: Exception loading sessions from persistent storage
    java.io.EOFException
    	at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    	at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
    	at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    	at java.io.ObjectInputStream.<init>(Unknown Source)
    	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.addChildInternal(ContainerBase.java:791)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
    	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    	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(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Application Initialized

    解决办法是:

    分析:EOFException表示输入过程中意外地到达文件尾或流尾的信号,导致从session中获取数据失败。异常是tomcat本身的问题,由于tomcat上次非正常关闭时有一些活动session被持久化(表现为一些临时文件),在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成的。此异常不影响系统的使用。 
    解决办法:将tomcat5.5workCatalinalocalhostpeamSESSIONS.ser删除。如果正常关闭服务端,该文件是自动删除的。

  • 相关阅读:
    Git中清除远程仓库HTTPS认证信息的方法
    JDK8新增时间类型用在JPA中的问题
    5 个关于 API 中日期和时间设计规则
    时间标准基础知识UTC和ISO8601
    JDK8中的时间API
    2019第7周日
    顶级思维模式:推导事物的第一性原理
    JS的jsoneditor,用来操作Json格式的界面;json-editor用来根据json数据生成界面
    Java读写文件,中文乱码解决
    intellij idea 热部署、热加载设置方法
  • 原文地址:https://www.cnblogs.com/exmyth/p/3412160.html
Copyright © 2011-2022 走看看