java notserializableexception_Tomcat java.io.NotSerializableException错误

这个问题已经在这里有了答案:????????????>????????????java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException????????????????????????????????????2个

启动Tomcat 7时出现此错误:

sept. 24, 2012 9:59:13 AM org.apache.catalina.session.StandardManager doLoad

Grave: "IOException" lors du chargement de sessions persistantes: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.objectweb.salome_tmf.ihm.main.datawrapper.DataModel

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.objectweb.salome_tmf.ihm.main.datawrapper.DataModel

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)

at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1595)

at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1060)

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

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

at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5293)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

at java.util.concurrent.FutureTask.run(FutureTask.java:166)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)

Caused by: java.io.NotSerializableException: org.objectweb.salome_tmf.ihm.main.datawrapper.DataModel

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)

at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1671)

at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1077)

at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:432)

at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)

at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:518)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)

at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5473)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)

at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1611)

at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1600)

... 5 more

sept. 24, 2012 9:59:13 AM org.apache.catalina.session.StandardManager startInternal

Grave: Exception au chargement des sessions depuis le stockage persistant (persistent storage)

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.objectweb.salome_tmf.ihm.main.datawrapper.DataModel

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)

at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1595)

at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1060)

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

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

at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5293)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

at java.util.concurrent.FutureTask.run(FutureTask.java:166)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)

Caused by: java.io.NotSerializableException: org.objectweb.salome_tmf.ihm.main.datawrapper.DataModel

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)

at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)

at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)

at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1671)

at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1077)

at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:432)

at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)

at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:518)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)

at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5473)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)

at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1611)

at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1600)

... 5 more

这是我的课:

public class DataModel implements ApiConstants,

DataConstants,IDataModelWrapper {

}

ApiConstants,DataConstants,IDataModelWrapper是简单的接口.

我应该实现Serializable接口吗?

任何帮助将不胜感激 .

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>