我正在尝试提供一个链接,以便从我的主题导航到控制面板。 我使用了以下代码。
<li><a href="$my_account_url">Manage Your Profile</a></li>
这在我的本地测试环境中运行良好。 但当我将其移至生产时,我得到了以下错误。
10:10:13,998 ERROR [IncludeTag:231] Current URL /group/control_panel/manage?p_p_auth=9AUrwzDp&p_p_id=2&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_count=1&refererPlid=25014&_2_struts_action=%2Fmy_account%2Fedit_user&_2_backURL=%2Fgroup%2F19765%2Fdashboard generates exception: An exception occurred processing JSP page /html/portlet/enterprise_admin/init.jsp at line 221
218: boolean isHavingUpdatePermission = false;
219: boolean isHavingAssignUserRolesPermission = false;
220:
221: boolean isOrganization = GroupLocalServiceUtil.getGroup(themeDisplay.getDoAsGroupId()).isOrganization();
222: long orgId = GroupLocalServiceUtil.getGroup(themeDisplay.getDoAsGroupId()).getOrganizationId();
223:
224: List<Role> objRolesList = RoleLocalServiceUtil.getUserGroupRoles(themeDisplay.getUserId(),themeDisplay.getDoAsGroupId());
Stacktrace:
10:10:13,999 ERROR [IncludeTag:154] com.liferay.portal.NoSuchGroupException: No Group exists with the primary key 0
at com.liferay.portal.service.persistence.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:723)
at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:517)
at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.service.GroupLocalServiceUtil.getGroup(GroupLocalServiceUtil.java:166)
at org.apache.jsp.html.portlet.enterprise_005fadmin.edit_005fuser_jsp._jspService(edit_005fuser_jsp.java:1162)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:175)
请帮我解决这个问题。 在此先感谢
答案 0 :(得分:0)
我不知道你是如何构建链接的,但这是我用于同一任务的代码:
#if($themeDisplay.getPermissionChecker().isOmniAdmin())
<a href="$themeDisplay.getURLControlPanel()">Control Panel</a>
#end