Glassfish 3.1 上的 Liferay 6 - 在 portlet jsp 文件中使用 liferay-ui 标记的问题

发布于 2024-12-17 11:29:30 字数 4564 浏览 2 评论 0原文

我们在当前的 Glassfish 3.1 集群设置中看到了这个问题。以下是问题详情 - 我们正在运行 Glassfish 版本 3.1

  • 我们正在运行 liferay 6.0.6
  • liferay war 部署在 Glassfish 集群上,并且在两个节点上运行良好。
  • 同样的 liferay war 在一台 Tomcat 服务器上也能正常工作。
  • 当我们在 Glassfish 集群上部署自定义 portlet 时,它在部署后立即开始工作。 (在重新启动 glassfish 集群之前)
  • 一旦我们重新启动集群节点,相同的 portlet 应用程序就会停止工作并抱怨并给出附加错误。
  • 到目前为止,我的研究表明 java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues 是 Portal-impl.jar 文件的一部分,该文件是 liferay 门户的一部分,应该可供我们的 portlet 使用。不知何故,重新启动后,jar 文件会以不同的方式加载,并且 portlet 无法使用相同的 jar 文件。
  • 我们还尝试了 Glassfish 3.1 Bundled liferay 6.1 设置,也看到了同样的问题。
  • 根据liferay论坛的建议,我们将portal-service.jar和portlet.jar放在[glassfish home]/lib目录中。
  • 当我们在 glassfish 节点实例进程上执行 lsof -p pid 时,它显示该进程打开了所需的 jar 文件。不知道为什么这对我们的应用程序不可用。

我将不胜感激任何解决/调查此问题的帮助或指示。

java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues
    at org.apache.jsp.html.taglib.ui.search_005fiterator.page_jsp._jspService(page_jsp.java from :500)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:68)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:785)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:534)        at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
    at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)

这是我在 liferay 论坛上的一个相关主题,但我还没有得到任何人的任何回应。 [liferay论坛上发布的相同问题]

我也尝试过放置Portal-impl.jar 在我的 portlet/WEB-INF/lib 目录中(不推荐这种方式),但我失败了,因为它要求我将所有其他依赖的 jar 也带入其中。

我现在已经没有选择了,正在考虑使用其他一些第三方库而不是使用 liferay 标签来实现分页功能。

这是给我们带来错误的特定标签

        <liferay-ui:search-iterator />

List of jars in my portlet WEB-INF/lib 文件夹

    SiebelClientWS-0.0.1-SNAPSHOT.jar
    spring-asm-3.0.5.RELEASE.jar
    XmlSchema-1.4.7.jar
    spring-aspects-3.0.5.RELEASE.jar
    aspectjrt-1.6.11.jar
    spring-beans-3.0.5.RELEASE.jar
    aspectjweaver-1.6.11.jar    
    spring-context-3.0.5.RELEASE.jar
    axiom-api-1.2.11.jar
    spring-context-support-3.0.5.RELEASE.jar
    axiom-impl-1.2.11.jar
    spring-core-3.0.5.RELEASE.jar
    axis2-1.5.4.jar
    spring-expression-3.0.5.RELEASE.jar
    axis2-kernel-1.5.4.jar
    spring-jdbc-3.0.5.RELEASE.jar
    axis2-transport-http-1.5.4.jar
    spring-tx-3.0.5.RELEASE.jar
    axis2-transport-local-1.5.4.jar
    spring-web-3.0.5.RELEASE.jar
    c3p0-0.9.1.2.jar    
    spring-webmvc-3.0.5.RELEASE.jar
    commons-codec-1.4.jar
    spring-webmvc-portlet-3.0.5.RELEASE.jar
    commons-httpclient-3.1.jar
    util-bridges.jar
    commons-logging.jar
    util-java.jar
    flexjson-2.1.jar    
    util-taglib.jar
    httpcore-4.0.jar    
    woden-api-1.0M9.jar
    httpcore-nio-4.0-beta1.jar
    woden-impl-commons-1.0M9.jar
    log4j.jar
    woden-impl-dom-1.0M9.jar
    neethi-2.0.2.jar    
    wsdl4j-1.6.2.jar
    spring-aop-3.0.5.RELEASE.jar
    wss4j-1.6.2.jar

We are seeing this issue on our current Glassfish 3.1 cluster setup. Below are details of issue
- We are running Glassfish version 3.1

  • We are running liferay 6.0.6
  • The liferay war is deployed on the Glassfish cluster and working fine on both the nodes.
  • The same liferay war works fine one Tomcat server as well.
  • When we deploy our custom portlets on Glassfish cluster it starts working immediately after deployment. (before doing a restart of glassfish cluster)
  • Once we do a restart of the cluster nodes the same portlet application stops working and Complains and give attached error.
  • My research till now shows that the java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues is part of portal-impl.jar file which is part of liferay portal and should be made available to our portlet. Somehow after the restart the jar files are loaded in a different manner and the same jar file is not available to portlet.
  • We have also tried the Glassfish 3.1 Bundled liferay 6.1 setup and see the same issue on it as well.
  • As suggested by liferay forums we have placed the portal-service.jar and portlet.jar in [glassfish home]/lib directory.
  • when we do a lsof -p pid on the glassfish node instance process it shows the required jar file is open by this process. Not sure why is this not available to our application.

I would appreciate any help or pointers to resolve/investigate this issue.

java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues
    at org.apache.jsp.html.taglib.ui.search_005fiterator.page_jsp._jspService(page_jsp.java from :500)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:68)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:785)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:534)        at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
    at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)

This is a related thread on liferay forum by me but I have not really got any response on it from anyone. [Same issue posted on liferay Forum]

i have also tried placing portal-impl.jar in my portlet/WEB-INF/lib dir (which is not recommended way) and I failed since it requires me to bring all other dependent jars in it too.

I am now running out of options and thinking about implementing the pagination feature using some other third party library instead of using liferay tags.

Here is the specific tag which is giving us error

        <liferay-ui:search-iterator />

List of jars in my portlet WEB-INF/lib folder


    SiebelClientWS-0.0.1-SNAPSHOT.jar
    spring-asm-3.0.5.RELEASE.jar
    XmlSchema-1.4.7.jar
    spring-aspects-3.0.5.RELEASE.jar
    aspectjrt-1.6.11.jar
    spring-beans-3.0.5.RELEASE.jar
    aspectjweaver-1.6.11.jar    
    spring-context-3.0.5.RELEASE.jar
    axiom-api-1.2.11.jar
    spring-context-support-3.0.5.RELEASE.jar
    axiom-impl-1.2.11.jar
    spring-core-3.0.5.RELEASE.jar
    axis2-1.5.4.jar
    spring-expression-3.0.5.RELEASE.jar
    axis2-kernel-1.5.4.jar
    spring-jdbc-3.0.5.RELEASE.jar
    axis2-transport-http-1.5.4.jar
    spring-tx-3.0.5.RELEASE.jar
    axis2-transport-local-1.5.4.jar
    spring-web-3.0.5.RELEASE.jar
    c3p0-0.9.1.2.jar    
    spring-webmvc-3.0.5.RELEASE.jar
    commons-codec-1.4.jar
    spring-webmvc-portlet-3.0.5.RELEASE.jar
    commons-httpclient-3.1.jar
    util-bridges.jar
    commons-logging.jar
    util-java.jar
    flexjson-2.1.jar    
    util-taglib.jar
    httpcore-4.0.jar    
    woden-api-1.0M9.jar
    httpcore-nio-4.0-beta1.jar
    woden-impl-commons-1.0M9.jar
    log4j.jar
    woden-impl-dom-1.0M9.jar
    neethi-2.0.2.jar    
    wsdl4j-1.6.2.jar
    spring-aop-3.0.5.RELEASE.jar
    wss4j-1.6.2.jar

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

久隐师 2024-12-24 11:29:30

我改变了

/html/taglib/ui/search_paginator/page.jsp
/html/taglib/ui/search_iterator/page.jsp
/html/taglib/ui/page_iterator/start.jsp

并删除了对 PropsValues 的调用,并将其替换为对 com.liferay.portal.kernel.util.PropsUtilPropsKeys 的调用code> 相反,这消除了我的错误。

我提出了改进请求
http://issues.liferay.com/browse/LPS-30660

I changed

/html/taglib/ui/search_paginator/page.jsp
/html/taglib/ui/search_iterator/page.jsp
/html/taglib/ui/page_iterator/start.jsp

and removed the calls to PropsValues and replaced them with calls to the com.liferay.portal.kernel.util.PropsUtil and PropsKeys instead and that go the rid of the error for me.

I made an improvement request
http://issues.liferay.com/browse/LPS-30660

枯叶蝶 2024-12-24 11:29:30

com/liferay/portal/util/PropsValues是portal-impl.jar文件的一部分,该文件是liferay门户的一部分,应该可供我们的portlet使用。

事实并非如此,portal-impl.jar 对您的 portlet 不可用,而且也并非如此。您不得将其放入 WEB-INF/lib 中。该罐子仅适用于 Liferay(liferay 应用程序),并且应该如此。

你能显示你的(部署的)portlet WEB-INF/lib 的内容(jar 列表)吗?

com/liferay/portal/util/PropsValues is part of portal-impl.jar file which is part of liferay portal and should be made available to our portlet.

That is not true, portal-impl.jar is not available to your portlets and it is not meant to. You MUST NOT put it in your WEB-INF/lib. That jar is only available, and should be that way, to Liferay (liferay application).

Can you show contents (list of jars) of your (deployed) portlets WEB-INF/lib?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文