我在weblogic服务器中部署应用程序时遇到以下异常:
[java] weblogic.management.jmx.RemoteRuntimeException:
java.rmi.UnmarshalException: failed to unmarshal class java.lang.Object;
嵌套异常是:
[java] java.io.InvalidClassException:
javax.servlet.ServletException; local class incompatible:
stream classdesc serialVersionUID = 4221302886851315160,
local class serialVersionUID = 205441063386195800
我有一个带有init方法的servlet,如下所示。
最初它只有setPreLoginURIMapper
方法并且工作正常。现在我添加了一个新方法setForgotPasswordOverlayURIMapper
除了它从 web.xml 中读取另一组init参数之外,它与setPreLoginURIMapper
的功能几乎相同。在web.xml中添加的新init参数也被赋予下面。
有什么想法吗?
public void init(HttpServlet servletArg) throws ServletException
{
super.init(servletArg);
setPreLoginURIMapper(servletArg);
//Added newly
setForgotPasswordOverlayURIMapper(servletArg);
return;
}
private void setForgotPasswordOverlayURIMapper(HttpServlet servletArg) throws ServletException
{
String propsStr = getNotEmptyParam(servletArg, ForgotPasswordOverlayURIMapperParam_);
TokenizedProperties props = TokenizedProperties.getInstance(propsStr, ITEM_DELIMITERS, ASSIGNMENT_DELIMITERS);
forgotPasswordOverlayURIMapper_ = getValidPreLoginURIMapper(props, servletArg.getServletName());
return;
}
web.xml 中的新条目如下所示:
<init-param>
<description>the URI for password overlay</description>
<param-name>ForgotPasswordOverlayURIMapper</param-name>
<param-value>
member=/security/member/inputFPUsername.ndo;
provider=/security/provider/inputFPUsername.ndo;
employer=/security/employer/inputFPUsername.ndo;
broker=/security/broker/inputFPUsername.ndo
shopping=/security/shopping/inputFPUsername.ndo
</param-value>
</init-param>