[英]InvalidClassException error while deserializing session data
Here is the calling code: 这是调用代码:
Object attribute = session.getAttribute(name, scope);
and this throws the following eror: 这会抛出以下错误:
Could not deserialize session data.
java.io.InvalidClassException: org.apache.commons.lang.time.FastDateFormat; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -7186497712641044641
The environment is Weblogic. 环境是Weblogic。 The Web application is a spring portlet.
Web应用程序是一个spring portlet。 I'm trying to understand how to fix this issue.
我试图了解如何解决这个问题。
Had to add the commons-lang to the "preferred application packages" section of weblogic.xml to get this fixed. 不得不将commons-lang添加到weblogic.xml的“首选应用程序包”部分以修复此问题。
<container-descriptor>
<prefer-application-packages>
<package-name>org.apache.commons.lang.*</package-name>
</prefer-application-packages>
<optimistic-serialization>true</optimistic-serialization>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.