Fórumok

Ext-plugin impl jar class loading issue on Linux

Jason Chen, módosítva 12 év-val korábban

Ext-plugin impl jar class loading issue on Linux

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
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, módosítva 12 év-val korábban

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

Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
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, módosítva 12 év-val korábban

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

Junior Member Bejegyzések: 62 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
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, módosítva 11 év-val korábban

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

New Member Bejegyzések: 8 Csatlakozás dátuma: 2012.10.26. Legújabb bejegyzések
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