Tomcat:IOException while loading persisted sessions

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/caodaoxi/article/details/83694306
Tomcat:IOException while loading persisted sessions: java.io.EOFException异常处理
Tomcat在启动时出现如下异常问题:

严重: IOException while loading persisted sessions: java.io.EOFException
严重: Exception loading sessions from persistent storage

是因为保存在硬盘上的session数据读取失败,问题似乎不大,但是如果不处理一下,每次启动都会出现这个问题,处理方法如下:

将work下面的文件清空,主要是*.ser文件,或者只是删除掉session.ser亦可。
展开阅读全文

重启tomcat报错,IOException while loading persisted sessions

05-31

已经试过两种解决方法:(还没有解决,请大神们帮忙!先谢过了)rn第一种:rn在server.xml中Context下添加如下的内容:rnrn rn rn第二种:rn让类实现接口java.io.Serializablernrn错误: rn[code=java]严重: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: cn.com.qzinfo.module.menu.model.SubMenu rnjava.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: cn.com.qzinfo.module.menu.model.SubMenu rn at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) rn at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) rn at java.util.ArrayList.readObject(ArrayList.java:733) rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) rn at java.lang.reflect.Method.invoke(Method.java:601) rn at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991) rn at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) rn at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) rn at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) rn at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) rn at java.util.HashMap.readObject(HashMap.java:1043) rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) rn at java.lang.reflect.Method.invoke(Method.java:601) rn at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991) rn at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) rn at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [/code] 论坛

Exception loading sessions from persistent storage

07-21

Eclipse的这种异常怎么解决rnException loading sessions from persistent storagernjava.io.EOFExceptionrn at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)rn at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)rn at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)rn at java.io.ObjectInputStream.(ObjectInputStream.java:280)rn at org.apache.catalina.util.CustomObjectInputStream.(CustomObjectInputStream.java:58)rn at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)rn at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)rn at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)rn at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:566)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 论坛

One or more errors encountered while loading the designer.

07-02

在一个Winform程序中新建一个Resource File,生成Resource1.resx和Resource1.Designer.cs文件,之后在Resource1.Designer.cs文件中添加一个方法:rn[code=C#]rnpublic static string GetString(string name)rnrn return ResourceManager.GetString(name);rnrn[/code]rn然后在Form1.Designer.cs中:rn[code=C#]this.Text = Resource1.GetString("String1");[/code]rnrn之后双击Form1.cs,窗口显示异常:rn One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. rnrnMethod 'WindowsApplication1.Resource1.GetString' not found. rnHide rnrnat Microsoft.VisualStudio.Shell.Design.VirtualType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)rnat System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)rnat System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)rnat System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)rnat System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) rnrn但是运行程序,程序运行正常,且Resource1中的String1也能成功显示。rnrn望高手指点!~~ 论坛

IOException 问题

08-05

小弟刚学servlet,希望高手多多指教,下面的代码提示,找不到字符public void doPost(HttpservletRequest request,HttpServletResponse response)throws ServletException,IOException I这个位置,还有下面的I的位置rnrnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport java.io.*;rnimport java.util.*;rnpublic class loginservlet extends HttpServletrnrn private static final String CONTENT_TYPE = "text/html;charset = GB2312";rn public void init()throws ServletExceptionrn rn rn public void doPost(HttpservletRequest request,HttpServletResponse response)throws ServletException,IOExceptionrn rn String username = request.getparameter("username");rn String password = request.getparameter("password"); rn HttpSession session = request.getSession(true);rn session.removeAttribute("username");rn session.setAttribute(username,"username");rn if(username == "aaa") rn response.sendRedirect("main.jsp");rn elsern response.sendRedirect("regedit.jsp");rn rn rn public void doGet(HttpservletRequest request,HttpServletResponse response)throws ServletException,IOExceptionrn doPost(request,response);rn rn public void destroy()rn rn rnrnrnrn[color=#000000]--------------------------------------------------------------------rn以下内容为自动编辑的内容,并非楼主的发贴内容,此仅用于显示而已,并无任何其他特殊作用rn楼主【tuoxie119】截止到2008-08-05 20:27:39的历史汇总数据(不包括此帖):rn发帖的总数量:0 发帖的总分数:0 每贴平均分数:0 rn回帖的总数量:6 得分贴总数量:1 回帖的得分率:16% rn结贴的总数量:0 结贴的总分数:0 rn无满意结贴数:0 无满意结贴分:0 rn未结的帖子数:0 未结的总分数:0 rn结贴的百分比:---------------------结分的百分比:---------------------rn无满意结贴率:---------------------无满意结分率:---------------------rn如何结贴请参考这里:[url=http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html][/url][/color]rn取消马甲机器人,请点这里:[url=http://www.java2000.net/mycsdn/robotStop.jsp?usern=tuoxie119][/url] 论坛

TWO open Sessions

05-12

在action里面调用了两次Service的方法,导致了 two open Session 这是为什么呢 rn一下是代码:rn1.action里面的方法:rn[code=Java]rn public String addPrSubtype() throws Exceptionrn DgProductType instance=this.iDgProductTypeService.findById(this.dgProductType.getPrTyId());rn ...rn this.iDgProductTypeService.attachDirty(instance);rn return "success";rn rn[/code]rn2.service里面的方法[code=Java]public class DgProductTypeService implements IDgProductTypeService rn...rn public void attachDirty(DgProductType instance) rn // TODO Auto-generated method stubrn this.iDgProductTypeDAO.attachDirty(instance);rn rn rn public DgProductType findById(Integer id) rn // TODO Auto-generated method stubrn DgProductType dgProductType =this.iDgProductTypeDAO.findById(id);rn return dgProductType;rn rnrnrnrn[/code]rnrn3.事务管理器rn[code=Java] rn rn rn rn rn rn rn rn rn rn rn rn rn PROPAGATION_REQUIRED,-Exceptionrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIRED,-Exceptionrn rn rn rn rn rn rn rn rn rn productTypeServicern dgUserServicern dgUserTypeService rn rn rn rn rn rn rn rn rn transactionInterceptor rn rn rn rn[/code]rn4.web.xml [code=Java] rn rn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rn config rn struts-default.xml,struts-plugin.xml,struts-user.xml,struts-product.xml rn rn rn rn OpenSessionInViewFilter rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter rn rn singleSession rn false rn rn rn rn rn encodingFilterrn rn com.SetCharacterEncodingFilterrn rn rn encodingrn UTF-8rn rn rn rn rn OpenSessionInViewFilter rn /* rn rn rn encodingFilterrn /*rn rnrn rn struts2rn /*rn [/code]rn 论坛

没有更多推荐了,返回首页