在weblogic中部署时出现java.rmi.UnmarshalException

时间:2014-07-04 08:31:35

标签: java servlets web.xml weblogic12c

我在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>

0 个答案:

没有答案