0
重新啓動tomcat時出現IOException。 我嘗試了各種解決方案,建議在exception loading sessions from persistent storageTomcat - 防止會話持續
他們都沒有解決問題。 我試着在context.xml中取消註釋<Manager pathname=""/>
。沒有幫助。
另一個建議的解決方案是使類實現Serialiable。我不想這樣做。
我的目標是讓Tomcat不堅持這些會話。 我使用的是Tomcat 7.0.54。
以下是堆棧跟蹤。請幫忙。
`SEVERE: IOException while loading persisted sessions:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.comp.cloud.portal.zCompHD
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.comp.cloud.portal.zCompHD
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1354)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.LinkedList.readObject(LinkedList.java:1136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.util.HashMap.readObject(HashMap.java:1183)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1619)
at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1084)
at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:282)
at org.apache.catalina.session.StandardManager.load(StandardManager.java:202)
at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:489)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5476)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
」 ...... 正如上文已提到,在默認情況下每個Web應用程序配置了標準的執行經理,並進行跨重新啓動會話持久性。要禁用此功能的持久性,爲Web應用程序創建一個Context的配置文件,並添加以下元素: ...「 - 請參閱http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Disable_Session_Persistence –
Leo
@Leo:如說明中所述上面,我試過這樣做。沒有幫助。還有什麼可以做到這一點? – vvid
無論如何 - 無論你現在是否想要會話持久化 - 將不可序列化的東西放到http會話中絕對不是個好主意。這可能是糟糕的應用設計的指標 –