2017-08-31 105 views
1

在部署了war文件之後,我在tomcat 6中遇到以下異常。但它有時只發生。它對應用程序有什麼影響?我需要什麼嗎?還請讓我爲什麼它發生在我的Tomcat? 在此先感謝。Tomcat 6有時在啓動應用程序時顯示異常

va.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.sun.faces.context.ExternalCon 
     at java.io.ObjectInputStream.readObject0(Unknown Source) 
     at java.io.ObjectInputStream.defaultReadFields(Unknown Source) 
     at java.io.ObjectInputStream.readSerialData(Unknown Source) 
     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) 
     at java.io.ObjectInputStream.readObject0(Unknown Source) 
     at java.io.ObjectInputStream.readObject(Unknown Source) 

    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 
used by: java.io.NotSerializableException: com.sun.faces.context.ExternalContextImpl 
     at java.io.ObjectOutputStream.writeObject0(Unknown Source) 
     at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) 
     at java.io.ObjectOutputStream.writeSerialData(Unknown Source) 
     at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) 
     at java.io.ObjectOutputStream.writeObject0(Unknown Source) 
     at java.io.ObjectOutputStream.writeObject(Unknown Source) 
     at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1551) 
     at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:994) 
     at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:523) 
     at org.apache.catalina.session.StandardManager.unload(StandardManager.java:469) 
     at org.apache.catalina.session.StandardManager.stop(StandardManager.java:673) 
     at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4774) 
     at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924) 
     at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1319) 
     at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1290) 
     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:323) 

    ... 6 more 
g 31, 2017 12:30:49 PM org.apache.catalina.session.StandardManager start 
VERE: Exception loading sessions from persistent storage 
va.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.sun.faces.context.ExternalCon 
     at java.io.ObjectInputStream.readObject0(Unknown Source) 
     at java.io.ObjectInputStream.defaultReadFields(Unknown Source) 
     at java.io.ObjectInputStream.readSerialData(Unknown Source) 
     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) 
     at java.io.ObjectInputStream.readObject0(Unknown Source) 
     at java.io.ObjectInputStream.readObject(Unknown Source) 
     at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1475) 
     at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:977) 
     at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394) 
     at org.apache.catalina.session.StandardManager.load(StandardManager.java:321) 
     at org.apache.catalina.session.StandardManager.start(StandardManager.java:643) 
     at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:438) 
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4559) 
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7 
+0

@Araf其實不完全一樣,事情是當我在eclipse中運行這個工作正常,只在tomcat中有時會顯示這個異常 – Balasubramanian

回答

1

從它看起來像某個應用程序存儲通過服務器重新啓動在會話對象不能持久(連載)堆棧跟蹤。

您可以使用configure Tomcat來根本不持久存在會話(或者嘗試其中記錄的替代持久性機制),或者找到正在會話中存儲可疑數據的應用程序並對其進行修復(推薦)。

+0

感謝你的回答。但我想和你一起去第二個選項。你能解釋我需要做什麼嗎? – Balasubramanian

+1

找出您的應用程序在會話中存儲的內容。不要在那裏存儲任何不可序列化的內容(如ExternalContext)。 –

+0

我可以知道爲什麼它有時只發生。不是所有的時間。 pl幫助糾正這個問題 – Balasubramanian

相關問題