2014-10-08 16 views
0

這個錯誤不是典型的,通常我只是在本地定義serialVersionUID,它會解決錯誤。這次我定義爲:private static final long serialVersionUID = -4737353341161547579L;InvalidClassException錯誤,不是一個典型的錯誤

這個問題真的歸結爲,我已經把上面的行放在類中,並且它被刪除了,從未被注意過。啓動了代碼並得到了下面的錯誤。然後我意識到我的錯誤,並把上述線回來,但我仍然得到相同的錯誤。

我該如何讓這件事消失? Tomcat仍然運行沒有任何問題,它幾乎就像沒有任何問題一樣。它只是填滿我的日誌文件。

SEVERE: Caught IOException decoding 612 bytes of data 
    java.io.InvalidClassException: com.bannervision.core.Configuration; local class incompatible: stream classdesc serialVersionUID = -4737353341161547579, local class serialVersionUID = -3792553423588133868 
     at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:604) 
     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620) 
     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515) 
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769) 
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348) 
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 
     at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializingTranscoder.java:112) 
     at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode0(SerializingTranscoder.java:98) 
     at net.rubyeye.xmemcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder.java:90) 
     at net.rubyeye.xmemcached.XMemcachedClient.getAndTouch(XMemcachedClient.java:1965) 
     at net.rubyeye.xmemcached.XMemcachedClient.getAndTouch(XMemcachedClient.java:1971) 
     at com.bannervision.core.data.dao.BaseDao.getObjectById(BaseDao.java:243) 
     at com.bannervision.core.data.dao.BaseDao.getObjectById(BaseDao.java:223) 
     at com.bannervision.web.tag.ConfigurationNameTag.doStartTag(ConfigurationNameTag.java:28) 
     at org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspx_meth_bv_005fconfigurationName_005f1(dashboard_jsp.java:2902) 
     at org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspx_meth_c_005fforEach_005f7(dashboard_jsp.java:2604) 
     at org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspx_meth_c_005fotherwise_005f12(dashboard_jsp.java:2528) 
     at org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspx_meth_c_005fchoose_005f13(dashboard_jsp.java:2455) 
     at org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspService(dashboard_jsp.java:475) 
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) 
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) 
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) 
     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) 
     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) 
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) 
     at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:172) 
     at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) 
     at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228) 
     at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011) 
     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955) 
     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) 
     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) 
     at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) 
     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 
     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) 
     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) 
     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 
     at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 
     at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) 
     at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) 
     at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) 
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) 
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) 
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) 
     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313) 
     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:722) 

任何幫助表示讚賞!

+1

你試過清理你的memcached服務器嗎? – spudone 2014-10-08 22:19:16

+0

不!這就像一個冠軍......我不知道這是一個選擇。你知道的越多! – 2014-10-08 22:36:45

回答

1

這些行:

java.io.InvalidClassException: com.bannervision.core.Configuration; local class incompatible: stream classdesc serialVersionUID = -4737353341161547579, local class serialVersionUID = -3792553423588133868 

    at net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializingTranscoder.java:112) 

由於serialVersionUIDs不匹配,這些行讓我覺得memcached服務器被持有到一個以前的值,這是相互矛盾的。清除緩存應該可以解決問題。

相關問題