掲示板

NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

thumbnail
12年前 に Kzvi Kzvi によって更新されました。

NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
I need to re-open this thread since the issue is not completely resolved.

We are seeing this issue now after the Glassfish 3.1 cluster restart.

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.


Stacktrace:



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)

thumbnail
12年前 に Kzvi Kzvi によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
I guess this may be related too

http://issues.liferay.com/browse/LEP-7097

No clue how it can be fixed though.
thumbnail
12年前 に Kzvi Kzvi によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
Not sure why nobdy in this forum is really interested in answering my questions. Is this is right forum? is this stupid questions? or do I need to provide more details? Please let me know. Looks like I am here on my own. Kinda getting disappointed and discouraged at liferay development now since the forum are not really very much help and quick response.

Does it make a difference if we buy the enterprise version?
thumbnail
12年前 に Kzvi Kzvi によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
I tried deploying opensocial portlet using update manager and seeing the same error on it too. This atleast confirms that the problem is with the installation setup.
thumbnail
12年前 に Juan Gonzalez P によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Hi Kzvi,

Please tell me some details about you glassfish cluster configuration. Do you have dynamic configuration enabled? (I mean your apps gets deployed in cluster just when you deploy it in glassfish DAS)

How many nodes does that cluster have? How many hosts(nodeagents)?Where is DAS in that architecture?

EDIT: Did you test with Glassfish 3.1.1? I remember there was some cluster errors in 3.1
thumbnail
12年前 に Kzvi Kzvi によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
@Juan - Thanks for your reply.

The glassfish version we have is - Oracle GlassFish Server 3.1.1 (build 12)

We have 2 Nodes on our development cluster and we follow below steps to deploy the portlet on our cluster

- Deploy the portlet war using the liferay admin UI. This saves the war file in a director called deploy on the app server
- After this we use Glassfish domain admin console to deploy the updated war file from deploy directory using deploy application option "Local Packaged File or Directory That Is Accessible from GlassFish Server "
- This deploys the portlet war into our cluster and the glassfish logs show that portlet application is deployed successfully.
- Now we do a restart of GF3 cluster.
- Now when we open the liferay we see the portlets are available to be added.
- Now we add one of the portlets on a liferay page and see the above mentioned error for NoClassDefFound.

Also, as I mentioned I have tried this with the latest Glassfish Bundle of Liferay 6.1b, and I see the same issue on it too.
thumbnail
12年前 に Kzvi Kzvi によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
@Juan - Adding to the same thread about my research on same.

I added following Jars to my portlet war and the portlets started working. I know its not a recommended solution to add these jars as part of the portlet but it seems to be working.

- commons-beanutils-1.7.0.jar
- commons-configuration.jar
- commons-lang-2.3.jar
- portal-impl.jar
- commons-collections-3.1.jar
- commons-digester.jar
- easyconf.jar
- xstream.jar

I am not sure what other issues it may cause with the portal.
thumbnail
12年前 に Juan Gonzalez P によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Kzvi Kzvi:
@Juan - Adding to the same thread about my research on same.

I added following Jars to my portlet war and the portlets started working. I know its not a recommended solution to add these jars as part of the portlet but it seems to be working.

- commons-beanutils-1.7.0.jar
- commons-configuration.jar
- commons-lang-2.3.jar
- portal-impl.jar
- commons-collections-3.1.jar
- commons-digester.jar
- easyconf.jar
- xstream.jar

I am not sure what other issues it may cause with the portal.


Seems the process you follow to deploy in glassfish cluster is the same as ours, so it's ok :-D.

Please test this two things:

* portal-service.jar and portlet.jar exists and are exactly the same over all the glassfish nodes on restart.
* To get the portal properties try using com.liferay.portal.kernel.util.PropsUtil, which is in shared portal-service.jar and seems better way to access properties from custom portlets.
thumbnail
12年前 に Juan Gonzalez P によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Did you solve the issue?
thumbnail
12年前 に Kzvi Kzvi によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

Junior Member 投稿: 30 参加年月日: 11/02/01 最新の投稿
The issue is not resolved yet, sorry for the late response on this.


portal-service.jar and portlet.jar exists and are exactly the same over all the glassfish nodes on restart.



Yes, I confirmed this and BOTH the jars are same on each node. I have copied them on glassfish/lib directory. where do you keep these JArs in your glassfish setup?


* To get the portal properties try using com.liferay.portal.kernel.util.PropsUtil, which is in shared portal-service.jar and seems better way to access properties from custom portlets.


I am not using Portal Properties directly anywhere in my code. We are using the search-iterator tag code, and it seems inside liferay some class is using it which is part of portal-impl.jar. I guess PropsUtil exists only in portal-impl.jar. So I thought of trying that.

Let me know if I should trying some other way for this.

Below tag is the exact code which shows the error


<liferay-ui:search-iterator />
11年前 に a l によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

New Member 投稿: 3 参加年月日: 12/01/10 最新の投稿
see http://issues.liferay.com/browse/LPS-30660
9年前 に Domingo Martinez によって更新されました。

RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet

New Member 投稿: 8 参加年月日: 15/01/29 最新の投稿
Hi Kzvi Kzvi,

I have the same issue that you, this comes with the portlet calendar CE in liferay 6.2 GA-2 and glassfish 3.1.1 as server.

My question is, did you can resolved the problem with the exeption "java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues".

Me too opened a thread about this problem: link

but no one answer yet.

Thanks for any advise,