Foren

Ext-plugin impl jar class loading issue on Linux

Jason Chen, geändert vor 12 Jahren.

Ext-plugin impl jar class loading issue on Linux

Junior Member Beiträge: 62 Beitrittsdatum: 22.07.10 Neueste Beiträge
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).
thumbnail
Mika Koivisto, geändert vor 12 Jahren.

RE: Ext-plugin impl jar class loading issue on Linux

Liferay Legend Beiträge: 1519 Beitrittsdatum: 07.08.06 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Ext-plugin impl jar class loading issue on Linux

Junior Member Beiträge: 62 Beitrittsdatum: 22.07.10 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Ext-plugin impl jar class loading issue on Linux

New Member Beiträge: 8 Beitrittsdatum: 26.10.12 Neueste Beiträge
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