Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jason Chen
Ext-plugin impl jar class loading issue on Linux
May 12, 2011 12:30 AM
Answer

Jason Chen

Rank: Junior Member

Posts: 62

Join Date: July 22, 2010

Recent Posts

Hi All,

We have overridden some classes in portal-impl and deploy it as extension plugin to jboss 5.1. Everything works well in Windows XP.

Then we start deploying to our Linux server, same JBoss 5.1 distribution. In linux, it doesn't seem to load the ext-impl jar first as our changes cannot be seen. We confirmed that by removing the classes in the portal-impl.jar then we can see our classes in ex-impl jar are loaded.

According to the liferay documentation, the rule is:

When container is up, loads web applications. I.e. Liferay web application's class loader load:

all jars starting with a,b,c,d,e,ext-* located in the WEB-INF/lib directory
after then other jars starting with f,g,h,...,portal-,...,util-,...


Have anyone faced the same issue? I have also confirmed that our ext-impl jar does not contain other jars (which some other users have issue with).
Mika Koivisto
RE: Ext-plugin impl jar class loading issue on Linux
May 12, 2011 5:02 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1505

Join Date: August 7, 2006

Recent Posts

The classloading order depends on the app server and os. It's usually not a good idea to override a class but instead extend it and configure liferay to use your extended class though there are some cases where you can't do that like util classes.
Jason Chen
RE: Ext-plugin impl jar class loading issue on Linux
May 12, 2011 5:38 PM
Answer

Jason Chen

Rank: Junior Member

Posts: 62

Join Date: July 22, 2010

Recent Posts

Hi Mika,

Totally agree that it's not a good idea to override. Sadly we mostly want to override the util classes such as LoginUtil (To prevent simultaneous login).
My colleague just did a workaround to extract the impl.jar classes to WEB-INF classes. Yes we know, it's ugly but we don't have much time to try other solutions.
Muthukumaran Madialagan
RE: Ext-plugin impl jar class loading issue on Linux
December 27, 2012 5:38 PM
Answer

Muthukumaran Madialagan

Rank: New Member

Posts: 8

Join Date: October 26, 2012

Recent Posts

Hi Chen,

Did you find a solution for this issue, we are also running into a similar issue.

I would really appreciate if you can share the details about the fix.

Thanks,
Muthu