Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Liferay 6.1-专用插件安装程序;“否认”;或在控制面板中被禁用_Java_Liferay_Portlet - Fatal编程技术网

Java Liferay 6.1-专用插件安装程序;“否认”;或在控制面板中被禁用

Java Liferay 6.1-专用插件安装程序;“否认”;或在控制面板中被禁用,java,liferay,portlet,Java,Liferay,Portlet,我正在为Liferay 6.1 EE GA3开发一个应用程序 在控制面板下,我们有一个privateplugininstaller部分,在这里我们可以安装/部署新的portlet。我正在使用面板,该部分工作正常 然后我尝试安装一个自定义portlet。由于某种原因,安装失败了,我从“deploy”文件夹中删除了portlet,甚至重新启动了服务器。这个portlet没有做任何特别的事情,它只是对Liferay的Lucene搜索引擎运行一些自定义查询 然后,在这个过程之后,“服务器>插件安装>私有

我正在为Liferay 6.1 EE GA3开发一个应用程序

在控制面板下,我们有一个privateplugininstaller部分,在这里我们可以安装/部署新的portlet。我正在使用面板,该部分工作正常

然后我尝试安装一个自定义portlet。由于某种原因,安装失败了,我从“deploy”文件夹中删除了portlet,甚至重新启动了服务器。这个portlet没有做任何特别的事情,它只是对Liferay的Lucene搜索引擎运行一些自定义查询

然后,在这个过程之后,“服务器>插件安装>私有插件安装程序”部分从我的屏幕上消失了

下面是我访问“服务器>服务器管理”和“服务器>插件安装”部分时看到的屏幕(您可以看到它显示为空,没有专用插件安装程序的链接):

屏幕截图1:Server>服务器管理(显示空屏幕)

屏幕截图2:Server>插件安装(显示空屏幕)

在此屏幕上,您可以看到我的用户拥有安装插件所需的所有管理权限:

屏幕截图3:我的用户配置文件和权限

在下面的屏幕中,您可以看到私有插件安装程序钩子安装在webapps文件夹中(事实上它一直都在安装),其他一些钩子、主题和portlet也是如此:

屏幕截图4:Tomcat的webaaps文件夹

下面是/html/portlet/admin/view.jsp和/html/portlet/admin/view.portal.jsp的内容(初始注释从代码中删除)。这些文件不是手动编辑的

/html/portlet/admin/view.jsp的内容

<%@ include file="/html/portlet/admin/view.portal.jsp" %>
<%@ include file="/html/portlet/admin/init.jsp" %>

<c:choose>
    <c:when test="<%= permissionChecker.isOmniadmin() %>">

        <%
        String tabs1 = ParamUtil.getString(request, "tabs1", "server");

        boolean showTabs1 = false;

        if (portletName.equals(PortletKeys.ADMIN_INSTANCE)) {
            tabs1 = "instances";
        }
        else if (portletName.equals(PortletKeys.ADMIN_PLUGINS)) {
            tabs1 = "plugins";
        }
        else if (portletName.equals(PortletKeys.ADMIN_SERVER)) {
            tabs1 = "server";
        }
        else if (portletName.equals(PortletKeys.ADMIN)) {
            showTabs1 = true;
        }

        String tabs2 = ParamUtil.getString(request, "tabs2");
        String tabs3 = ParamUtil.getString(request, "tabs3");

        if (tabs1.equals("plugins")) {
            if (!tabs2.equals("portlet-plugins") && !tabs2.equals("theme-plugins") && !tabs2.equals("layout-template-plugins") && !tabs2.equals("hook-plugins") && !tabs2.equals("web-plugins")) {
                tabs2 = "portlet-plugins";
            }
        }

        int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
        int delta = ParamUtil.getInteger(request, SearchContainer.DEFAULT_DELTA_PARAM);

        PortletURL portletURL = renderResponse.createRenderURL();

        portletURL.setParameter("struts_action", "/admin/view");
        portletURL.setParameter("tabs1", tabs1);
        portletURL.setParameter("tabs2", tabs2);
        portletURL.setParameter("tabs3", tabs3);
        %>

        <portlet:renderURL var="redirectURL">
            <portlet:param name="struts_action" value="/admin/view" />
            <portlet:param name="tabs1" value="<%= tabs1 %>" />
            <portlet:param name="tabs2" value="<%= tabs2 %>" />
            <portlet:param name="tabs3" value="<%= tabs3 %>" />
            <portlet:param name="cur" value="<%= String.valueOf(cur) %>" />
        </portlet:renderURL>

        <aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
            <aui:input name="<%= Constants.CMD %>" type="hidden" />
            <aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
            <aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
            <aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
            <aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
            <aui:input name="portletId" type="hidden" />

            <c:if test="<%= showTabs1 %>">
                <liferay-ui:tabs
                    names="server,instances,plugins"
                    url="<%= portletURL.toString() %>"
                />
            </c:if>

            <c:choose>
                <c:when test='<%= tabs1.equals("server") %>'>
                    <%@ include file="/html/portlet/admin/server.jspf" %>

                    <aui:script use="liferay-admin">
                        new Liferay.Portlet.Admin(
                            {
                                form: document.<portlet:namespace />fm,
                                namespace: '<portlet:namespace />',
                                url: '<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>'
                            }
                        );
                    </aui:script>
                </c:when>
                <c:when test='<%= tabs1.equals("instances") %>'>
                    <%@ include file="/html/portlet/admin/instances.jspf" %>
                </c:when>
                <c:when test='<%= tabs1.equals("plugins") %>'>

                    <%
                    PortletURL marketplaceURL = null;

                    if ((PrefsPropsUtil.getBoolean(PropsKeys.AUTO_DEPLOY_ENABLED, PropsValues.AUTO_DEPLOY_ENABLED) || PortalUtil.isOmniadmin(user.getUserId())) && PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_STORE)) {
                        marketplaceURL = ((RenderResponseImpl)renderResponse).createRenderURL(PortletKeys.MARKETPLACE_STORE);
                    }

                    boolean showEditPluginHREF = false;
                    boolean showReindexButton = true;
                    %>

                    <%@ include file="/html/portlet/plugins_admin/plugins.jspf" %>
                </c:when>
            </c:choose>
        </aui:form>

        <aui:script>
            function <portlet:namespace />saveServer(cmd) {
                document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = cmd;
                document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<portlet:renderURL><portlet:param name="struts_action" value="/admin/view" /><portlet:param name="tabs1" value="<%= tabs1 %>" /><portlet:param name="tabs2" value="<%= tabs2 %>" /><portlet:param name="tabs3" value="<%= tabs3 %>" /><portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= String.valueOf(cur) %>" /><portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= String.valueOf(delta) %>" /></portlet:renderURL>";
                submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>");
            }
        </aui:script>
    </c:when>
    <c:otherwise>
        <liferay-util:include page="/html/portal/portlet_access_denied.jsp" />
    </c:otherwise>
</c:choose>

/html/portlet/admin/view.portal.jsp的内容

<%@ include file="/html/portlet/admin/view.portal.jsp" %>
<%@ include file="/html/portlet/admin/init.jsp" %>

<c:choose>
    <c:when test="<%= permissionChecker.isOmniadmin() %>">

        <%
        String tabs1 = ParamUtil.getString(request, "tabs1", "server");

        boolean showTabs1 = false;

        if (portletName.equals(PortletKeys.ADMIN_INSTANCE)) {
            tabs1 = "instances";
        }
        else if (portletName.equals(PortletKeys.ADMIN_PLUGINS)) {
            tabs1 = "plugins";
        }
        else if (portletName.equals(PortletKeys.ADMIN_SERVER)) {
            tabs1 = "server";
        }
        else if (portletName.equals(PortletKeys.ADMIN)) {
            showTabs1 = true;
        }

        String tabs2 = ParamUtil.getString(request, "tabs2");
        String tabs3 = ParamUtil.getString(request, "tabs3");

        if (tabs1.equals("plugins")) {
            if (!tabs2.equals("portlet-plugins") && !tabs2.equals("theme-plugins") && !tabs2.equals("layout-template-plugins") && !tabs2.equals("hook-plugins") && !tabs2.equals("web-plugins")) {
                tabs2 = "portlet-plugins";
            }
        }

        int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
        int delta = ParamUtil.getInteger(request, SearchContainer.DEFAULT_DELTA_PARAM);

        PortletURL portletURL = renderResponse.createRenderURL();

        portletURL.setParameter("struts_action", "/admin/view");
        portletURL.setParameter("tabs1", tabs1);
        portletURL.setParameter("tabs2", tabs2);
        portletURL.setParameter("tabs3", tabs3);
        %>

        <portlet:renderURL var="redirectURL">
            <portlet:param name="struts_action" value="/admin/view" />
            <portlet:param name="tabs1" value="<%= tabs1 %>" />
            <portlet:param name="tabs2" value="<%= tabs2 %>" />
            <portlet:param name="tabs3" value="<%= tabs3 %>" />
            <portlet:param name="cur" value="<%= String.valueOf(cur) %>" />
        </portlet:renderURL>

        <aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
            <aui:input name="<%= Constants.CMD %>" type="hidden" />
            <aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
            <aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
            <aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
            <aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
            <aui:input name="portletId" type="hidden" />

            <c:if test="<%= showTabs1 %>">
                <liferay-ui:tabs
                    names="server,instances,plugins"
                    url="<%= portletURL.toString() %>"
                />
            </c:if>

            <c:choose>
                <c:when test='<%= tabs1.equals("server") %>'>
                    <%@ include file="/html/portlet/admin/server.jspf" %>

                    <aui:script use="liferay-admin">
                        new Liferay.Portlet.Admin(
                            {
                                form: document.<portlet:namespace />fm,
                                namespace: '<portlet:namespace />',
                                url: '<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>'
                            }
                        );
                    </aui:script>
                </c:when>
                <c:when test='<%= tabs1.equals("instances") %>'>
                    <%@ include file="/html/portlet/admin/instances.jspf" %>
                </c:when>
                <c:when test='<%= tabs1.equals("plugins") %>'>

                    <%
                    PortletURL marketplaceURL = null;

                    if ((PrefsPropsUtil.getBoolean(PropsKeys.AUTO_DEPLOY_ENABLED, PropsValues.AUTO_DEPLOY_ENABLED) || PortalUtil.isOmniadmin(user.getUserId())) && PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_STORE)) {
                        marketplaceURL = ((RenderResponseImpl)renderResponse).createRenderURL(PortletKeys.MARKETPLACE_STORE);
                    }

                    boolean showEditPluginHREF = false;
                    boolean showReindexButton = true;
                    %>

                    <%@ include file="/html/portlet/plugins_admin/plugins.jspf" %>
                </c:when>
            </c:choose>
        </aui:form>

        <aui:script>
            function <portlet:namespace />saveServer(cmd) {
                document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = cmd;
                document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<portlet:renderURL><portlet:param name="struts_action" value="/admin/view" /><portlet:param name="tabs1" value="<%= tabs1 %>" /><portlet:param name="tabs2" value="<%= tabs2 %>" /><portlet:param name="tabs3" value="<%= tabs3 %>" /><portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= String.valueOf(cur) %>" /><portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= String.valueOf(delta) %>" /></portlet:renderURL>";
                submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>");
            }
        </aui:script>
    </c:when>
    <c:otherwise>
        <liferay-util:include page="/html/portal/portlet_access_denied.jsp" />
    </c:otherwise>
</c:choose>

新建Liferay.Portlet.Admin(
{
形式:document.fm,
命名空间:“”,
url:“”
}
);
函数saveServer(cmd){
document.fm..value=cmd;
document.fm.redirect.value=“”;
提交格式(document.fm,“”);
}

感谢您的关注

我不确定会发生什么,但根据您的描述和列出一些问题的评论,我有一些想法:

  • 您可能希望从marketplace安装,可能会从您正在运行的版本更新
  • 如果存在重叠(冲突)的view.jsp,您可能希望将其向后移植到6.1并标记冲突覆盖。如果已经存在冲突,则必须恢复原始jsp,因为它可能在部署冲突挂钩期间被删除
  • 当您在Liferay EE上声明这些问题时,打开一张支持票很可能会对您有所帮助-这就是为什么
  • 如果您的日志文件太大而没有意义:检查它是否可以追溯到古代,例如,也许您只需要最后几KB。在这种情况下:缩短它并设置logrotation。如果所有的千兆字节都是最近生成的,那么要么是日志记录太多,要么是有一些问题需要尽快解决

尝试清理服务器的临时文件夹和工作文件夹。那可能会有帮助

我已经放弃了解决这个问题,但我还是成功地解决了这个问题

我正在用Lucene开发一个portlet来操作和搜索内容(来自Liferay文档库),因此,我停止并重新启动了我的Liferay实例,在portal-ext.properties中未注释以下行

index.on.startup=true


令我惊讶的是,在所有门户内容都重新编制索引并完成启动过程之后,“服务器>服务器管理”、“服务器>插件安装”和私有插件安装程序的链接又开始工作了。我不会撒谎:我不知道为什么“index.on.startup=true”解决了这个问题。如果有人对此有什么想法或理论,我会很高兴听到的。感谢您的帮助。

第一个屏幕截图显示“服务器管理”屏幕。至少在6.1 CE GA3中,“插件安装”部分列出了私有插件安装程序。不是在那里找到的吗?如果没有,您能否给我们服务器管理和插件安装屏幕的URL路径(例如
/group/control\u panel/manage?p\u p\u id=136&p\u p\u lifecycle=0&p\u p\u state=maximized&p\u p\u mode=view&doAsGroupId=10179&refererPlid=10613
)“插件安装”部分在那里。。。。。。我添加了错误的屏幕截图。。。。我将更新这个问题,谢谢你的观察:-)现在这是可疑的!日志中没有一些错误消息吗?是的,这看起来非常有趣而且可疑。一个假设是,这与此有关:我还没有在日志中发现任何有用的东西(catalina.out的大小略大于4GB),这似乎与:我将从市场上尝试安装,如果这不能解决问题,我会尝试开一张支持票。我之所以不这么做是因为我这里有一些庸俗的问题