Liferay 自动登录时发送重定向

Liferay 自动登录时发送重定向,liferay,autologin,Liferay,Autologin,奥洛金。当用户不存在时,尝试重定向到我的自定义portlet时发生以下异常 java.lang.NullPointerException at com.liferay.portlet.PortletURLImpl.generateToString(PortletURLImpl.java:850) at com.liferay.portlet.PortletURLImpl$ToStringPrivilegedAction.run(PortletURLImpl.java:1501) at com.l

奥洛金。当用户不存在时,尝试重定向到我的自定义portlet时发生以下异常

java.lang.NullPointerException
at com.liferay.portlet.PortletURLImpl.generateToString(PortletURLImpl.java:850)
at com.liferay.portlet.PortletURLImpl$ToStringPrivilegedAction.run(PortletURLImpl.java:1501)
at com.liferay.portlet.PortletURLImpl$ToStringPrivilegedAction.run(PortletURLImpl.java:1)
at com.liferay.portal.security.lang.DoPrivilegedUtil$NoPACL.wrap(DoPrivilegedUtil.java:64)
at com.liferay.portal.security.lang.DoPrivilegedUtil.wrap(DoPrivilegedUtil.java:26)
at com.liferay.portlet.PortletURLImpl.toString(PortletURLImpl.java:740)
当你试着打这个电话的时候

PortletURL portletURL = getRenderURL(request, somePortletName, somePlid);
response.sendRedirect(portletURL.toString());

public static PortletURL getRenderURL(HttpServletRequest request, String portletId, long plid)
{
    return PortletURLFactoryUtil.create(

            request,
            portletId,
            plid,
            PortletRequest.RENDER_PHASE);
}

是禁止在autologin中调用sendRedirect还是可以建议我使用workarround?故事:singleSignOn后,如果用户在liferay中不存在,它会将其重定向到我的自定义注册表并预填充检索到的已知数据。

您的
portletURL
似乎为空,您能否将代码提供给
getrenderURL
方法..抱歉,我已更新了上面的代码