我的jbuilder8+struts在编译时有个问题。

03-05-13 johncool

我用jb8+struts建立了一个系统,其中DM是DATAMOUDLE,有时候在启动的时候会出现下列错误,虽不影响使用,但感觉心里不塌实,请诸位大虾指教。

StandardManager[/tkGroup]: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: tkbf.tkGroup.myClass.DM

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: tkbf.tkGroup.myClass.DM

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)

at org.apache.catalina.startup.Catalina.process(Catalina.java:179)

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:324)

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

Caused by: java.io.NotSerializableException: tkbf.tkGroup.myClass.DM

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

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

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

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

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

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

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

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

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

at org.apache.catalina.session.StandardManager.stop(StandardManager.java:654)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1184)

at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3495)

at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:984)

at org.apache.catalina.core.StandardHost.remove(StandardHost.java:815)

at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:422)

at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:402)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:234)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1151)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1163)

at org.apache.catalina.core.StandardService.stop(StandardService.java:435)

at org.apache.catalina.core.StandardServer.stop(StandardServer.java:535)

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

... 7 more

StandardManager[/tkGroup]: Exception loading sessions from persistent storage

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: tkbf.tkGroup.myClass.DM

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)

at org.apache.catalina.startup.Catalina.process(Catalina.java:179)

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:324)

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

Caused by: java.io.NotSerializableException: tkbf.tkGroup.myClass.DM

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

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

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

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

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

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

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

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

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

at org.apache.catalina.session.StandardManager.stop(StandardManager.java:654)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1184)

at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3495)

at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:984)

at org.apache.catalina.core.StandardHost.remove(StandardHost.java:815)

at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:422)

at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:402)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:234)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1151)

at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1163)

at org.apache.catalina.core.StandardService.stop(StandardService.java:435)

at org.apache.catalina.core.StandardServer.stop(StandardServer.java:535)

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

... 7 more

ContextConfig[/tkGroup]: Added certificates -> request attribute Valve

StandardWrapper[/tkGroup:default]: Loading container servlet default

2002-5-13 13:45:49 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true

2002-5-13 13:45:49 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true

2002-5-13 13:45:50 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='tkbf.tkGroup.ApplicationResources', returnNull=true

StandardWrapper[/tkGroup:invoker]: Loading container servlet invoker

WebappLoader[]: Deploying class repositories to work directory D:\lt\Tomcat\work

WebappLoader[]: Reloading checks are enabled for this Context

StandardManager[]: Seeding random number generator class java.security.SecureRandom

StandardManager[]: Seeding of random number generator has been completed

ContextConfig[]: Added certificates -> request attribute Valve

StandardWrapper[:default]: Loading container servlet default

StandardWrapper[:invoker]: Loading container servlet invoker

HttpConnector[8080] Starting background thread

----signIn reset

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

2002-5-13 13:45:56 org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true

HongWei
2003-05-14 13:34

Exception是java.io.NotSerializableException,我想是类DM在实现序列化接口有问题

johncool
2003-05-16 15:40

可我要如何实现序列化接口呢?