在Tomcat 7上部署webApplication时,我将获得以下控制台输出。重新启动服务器两次或三次后,服务器将正常运行。
我正在使用JSF,Tomcat和到businesslogic部分的RMI连接(这里无关紧要?)
@ViewScoped托管bean中的@EJB导致java.io.NotSerializableException-在这里我了解了序列化。但是在那种 _情况下,客户端状态保存_被激活了,在我的webApp中不是这种情况(据我的web.xml所知)。那么,对我的视域化ManagedBeans进行序列化是必要的,还是有另一个失败?
这是我的启动控制台输出(对其中的德语部分表示抱歉):
28.01.2011 20:25:05 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Programme\Java\jdk1.6.0_21\jre\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Programme/Java/jre6/bin/client;C:/Programme/Java/jre6/bin;C:/Programme/Java/jre6/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Gemeinsame Dateien\Lenovo;C:\Programme\ATI Technologies\ATI.ACE\Core-Static;C:\Programme\Java\jdk1.6.0_20;C:\StudiPortal\TortoiseSVN\bin;C:\StudiPortal\apache-maven-2.0.11\bin;C:\Programme\Intel\WiFi\bin\;C:\Programme\ThinkPad\ConnectUtilities;C:\Programme\GTK2-Runtime\bin;C:\Programme\OpenVPN\bin 28.01.2011 20:25:05 org.apache.tomcat.util.digester.SetPropertiesRule begin WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:shapeyourbody' did not find a matching property. 28.01.2011 20:25:06 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 28.01.2011 20:25:06 org.apache.coyote.ajp.AjpProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 28.01.2011 20:25:06 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 481 ms 28.01.2011 20:25:06 org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina 28.01.2011 20:25:06 org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.5 28.01.2011 20:25:09 com.sun.faces.config.ConfigureListener contextInitialized INFO: Mojarra 2.0.3 (FCS b03) für Kontext '/shapeyourbody' wird initialisiert. 28.01.2011 20:25:10 com.sun.faces.spi.InjectionProviderFactory createInstance INFO: JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.aliasbean.AliasBeanTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.aliasbean.AliasBeansScopeTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.calendar.HtmlInputCalendarTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.date.HtmlInputDateTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.schedule.ScheduleTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse 'org.apache.myfaces.custom.tree.taglib.TreeTagHandler' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse '[handler-class: null]' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse '[handler-class: null]' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse '[handler-class: null]' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass WARNUNG: JSF1029: Die Anwendung hat Version 2.0 (entweder ausdrücklich durch die Version von /WEB-INF/faces-config.xml oder eine fehlende /WEB-INF/faces-confg.xml), jedoch hängt Klasse '[handler-class: null]' von einer Legacy-Facelet-Klasse ab. Das von dieser Klasse registrierte Facelet-Artefakt wird nicht registriert. 28.01.2011 20:25:10 org.apache.catalina.session.StandardManager doLoad SCHWERWIEGEND: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1576) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1059) 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:465) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5025) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:738) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:289) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:442) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:674) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.startup.Catalina.start(Catalina.java:596) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Caused by: java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1652) at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1076) at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:406) at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353) at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:492) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5195) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216) at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1074) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216) at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1074) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216) at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:498) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216) at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:695) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:216) at org.apache.catalina.startup.Catalina.stop(Catalina.java:663) at org.apache.catalina.startup.Catalina.start(Catalina.java:630) ... 6 more 28.01.2011 20:25:10 org.apache.catalina.session.StandardManager startInternal SCHWERWIEGEND: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1030) 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:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1576) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1059) 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:465) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5025) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:738) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:289) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:442) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:674) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) at org.apache.catalina.startup.Catalina.start(Catalina.java:596) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) Caused by: java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at java.util.HashMap.writeObject(HashMap.java:1001) 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:597) ... 6 more 28.01.2011 20:25:11 org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 28.01.2011 20:25:11 org.apache.coyote.ajp.AjpProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 28.01.2011 20:25:11 org.apache.catalina.startup.Catalina start INFO: Server startup in 4976 ms
感谢您的帮助
这是跟踪的相关部分:
SCHWERWIEGEND: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean … at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1576) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1059) 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:465) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) …
SCHWERWIEGEND: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: org.dhbw.stg.wwi2008c.mopro.ui.viewscoped.MachineReservationListBean … at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1576) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1059) 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:465) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140) …
这个问题与您链接的问题所涉及的问题不同。默认情况下,当Tomcat关闭时,它将序列化HttpSession到磁盘,然后在启动时从磁盘重新加载,以便最终用户可以继续浏览器会话而不会丢失任何会话数据。
HttpSession
在这种情况下,任何会话属性都应实现Serializable。默认情况下,JSF视图状态存储在会话中,包括所有适当的视图范围的Bean。他们还需要实施Serializable以使Tomcat关闭/重新启动。
Serializable
从技术上讲,您可以忽略它。如果尚不存在,JSF仍将重新创建会话/视图范围的bean。但是,最终用户将无法继续使用相同的会话/视图范围的数据。当会话不包含任何不可序列化的对象时,将不会发生这些异常。这就是为什么它“有时”有效的原因。
如果您想完全 禁用 会话持久性,以免被那些异常/警告所困扰,那么您需要向该Web应用程序的元素中添加一个<Manager>具有 空 pathname属性的<Context>元素。
<Manager>
pathname
<Context>
<Context ... > <Manager pathname="" /> </Context>
这基本上指示使用Tomcat 没有 会话管理器在所有。
Context