首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException

2014-01-26 
我在MyEclipse里启动tomcat就提示我的topic里有错误, Topic就是个普通的javaBean,里面就是属性和geter(),se

我在MyEclipse里启动tomcat就提示我的topic里有错误,
Topic就是个普通的javaBean,里面就是属性和geter(),setter();
我用Struts建的项目

错误提示:

严重: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: okancn.topic.Topic
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: okancn.topic.Topic
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1303)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1392)
at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:921)
at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:393)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:320)
at org.apache.catalina.session.StandardManager.start(StandardManager.java:636)
at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:431)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4155)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

------解决方法--------------------------------------------------------
Topic这个类应该实现Serializable接口
------解决方法--------------------------------------------------------
实现Serializable空接口
这个接口是空的..只要声明就可以了
------解决方法--------------------------------------------------------
实现序列化接口

这种在网络间传输的值对象必须实现,如果暂时不使用这个对象时它不会被回收,而是先从内存转移到硬盘需要序列化
------解决方法--------------------------------------------------------
implements Serializable

        

热点排行