Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kzvi Kzvi
NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
November 21, 2011 9:47 PM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

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:

 1
 2
 3java.lang.NoClassDefFoundError: com/liferay/portal/util/PropsValues
 4        at org.apache.jsp.html.taglib.ui.search_005fiterator.page_jsp._jspService(page_jsp.java from :500)
 5        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
 6        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
 7        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
 8        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
 9        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
10        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
11        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
12        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
13        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)
14        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:68)
15        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
16        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:785)
17        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
18        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
19        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:534)        at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
20        at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
21        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)
Kzvi Kzvi
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
November 21, 2011 9:51 PM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

I guess this may be related too

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

No clue how it can be fixed though.
Kzvi Kzvi
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
November 22, 2011 11:09 AM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

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?
Kzvi Kzvi
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
November 22, 2011 6:06 PM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

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.
Juan Gonzalez
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
November 24, 2011 11:32 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2795

Join Date: October 28, 2008

Recent Posts

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
Kzvi Kzvi
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
December 12, 2011 3:08 PM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

@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.
Kzvi Kzvi
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
December 12, 2011 3:31 PM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

@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.
Juan Gonzalez
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
December 13, 2011 12:52 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2795

Join Date: October 28, 2008

Recent Posts

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.
Juan Gonzalez
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
December 14, 2011 10:11 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2795

Join Date: October 28, 2008

Recent Posts

Did you solve the issue?
Kzvi Kzvi
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
December 16, 2011 3:00 PM
Answer

Kzvi Kzvi

Rank: Junior Member

Posts: 30

Join Date: February 1, 2011

Recent Posts

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

1
2<liferay-ui:search-iterator />
a l
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
October 25, 2012 11:50 AM
Answer

a l

Rank: New Member

Posts: 4

Join Date: January 10, 2012

Recent Posts

see http://issues.liferay.com/browse/LPS-30660
Domingo Martinez
RE: NoClassDefFound Error on GF3 cluster restart liferay-ui tag sdk portlet
February 19, 2015 11:17 AM
Answer

Domingo Martinez

Rank: New Member

Posts: 8

Join Date: January 29, 2015

Recent Posts

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,