Liferay Autologin Hook生产';您的请求未能完成';在portlet中

Liferay Autologin Hook生产';您的请求未能完成';在portlet中,liferay,liferay-6,Liferay,Liferay 6,我已经完成了一个定制的Autologin过滤器,它似乎工作得很好,但是当Liferay重定向到主页时(一旦用户通过身份验证),登录portlet显示了一个我无法理解的错误 错误显示“您的请求未能完成”,但用户已成功登录,如果我按F5或浏览页面,错误将消失 我的Autologin类实现是: public String[] login(HttpServletRequest request, HttpServletResponse response) throws AutoLoginE

我已经完成了一个定制的Autologin过滤器,它似乎工作得很好,但是当Liferay重定向到主页时(一旦用户通过身份验证),登录portlet显示了一个我无法理解的错误

错误显示“您的请求未能完成”,但用户已成功登录,如果我按F5或浏览页面,错误将消失

我的Autologin类实现是:

public String[] login(HttpServletRequest request,
        HttpServletResponse response) throws AutoLoginException {
    String[] credentials = new String[3];

    String p_id = request.getParameter("p_p_id");
    String userName = null;
    String password = null;
    if (p_id != null) {
        userName = request.getParameter("_" + p_id + "_login");
        password = request.getParameter("_" + p_id + "_password");
        //Custom authentication code required [...]
    }
    if (userName != null) {
        // New Login
        try {

            //We log as Test user...just for TEST
            long companyId = PortalUtil.getCompanyId(request);
            User user = UserLocalServiceUtil.getUserByScreenName(companyId, "Test");
            long userId = user.getUserId();
            String userPwd = user.getPassword();

            credentials[0] = Long.toString(userId);
            credentials[1] = userPwd;
            credentials[2] = Boolean.FALSE.toString();

        } catch (Exception e) {
            e.printStackTrace();
            throw new AutoLoginException(e);
        }
    return credentials;

    }
    return credentials;
}
我还实现了一个自定义验证器,它总是返回成功

你知道我做错了什么吗

提前非常感谢


Ivan fontanals

日志中没有错误。一切似乎都很顺利。错误只显示在返回的页面中…我将上传一个屏幕截图。谢谢你,莎拉娜!