A 'ClassNotFoundException' Thrown by WebLogic 12c

This article documents a known issue that occurs when deploying portlets that use JNDI.

Liferay Digital Experience Platform (DXP) isn't able to load Weblogic's JNDI classes by default, which often results in a ClassNotFoundException on weblogic.jndi.WLInitialContextFactory.

Resolution

Status: Fixed in DXP 7.1

DXP 7.1 contains all of the required settings to handle WebLogic's JNDI classes in the portal.properties file. Administrators do not have to modify the portal.properties using a portal-ext.properties file (as best practices).

Customers still using DXP 7.0 should consider upgrading as soon as possible. Otherwise, there is a workaround.

Workaround Available for DXP 7.0

To resolve this issue, you will need to add two classes to Liferay's bootdelegator property module.framework.properties.org.osgi.framework.bootdelegation= in your portal-ext.properties. Because this property is inclusive, you must add any new values in addition to the default values.

For example, if a property like this is added:

module.framework.properties.org.osgi.framework.bootdelegation=\
weblogic.jndi,\
weblogic.jndi.*

then the bootdelegator will only load those two classes. Because this property has changed in several Fix Packs, here are the full properties you must place based on the current Fix Pack you have installed:

Default (No Fix Packs) 

    module.framework.properties.org.osgi.framework.bootdelegation=\
        __redirected,\
        com.sun.ccpp,\
        com.sun.ccpp.*,\
        com.sun.crypto.*,\
        com.sun.el,\
        com.sun.el.*,\
        com.sun.image.*,\
        com.sun.jmx.*,\
        com.sun.jna,\
        com.sun.jndi.*,\
        com.sun.mail.*,\
        com.sun.management.*,\
        com.sun.media.*,\
        com.sun.msv.*,\
        com.sun.org.*,\
        com.sun.syndication,\
        com.sun.tools.*,\
        com.sun.xml.*,\
        com.yourkit.*,\
        sun.*\
	weblogic.jndi,\
	weblogic.jndi.*

DE-2 (LPS-65488, removed sun.el)

    module.framework.properties.org.osgi.framework.bootdelegation=\
        __redirected,\
        com.sun.ccpp,\
        com.sun.ccpp.*,\
        com.sun.crypto.*,\
        com.sun.image.*,\
        com.sun.jmx.*,\
        com.sun.jna,\
        com.sun.jndi.*,\
        com.sun.mail.*,\
        com.sun.management.*,\
        com.sun.media.*,\
        com.sun.msv.*,\
        com.sun.org.*,\
        com.sun.syndication,\
        com.sun.tools.*,\
        com.sun.xml.*,\
        com.yourkit.*,\
        sun.*\
	weblogic.jndi,\
	weblogic.jndi.*

DE-8 (LPS-69090, added com.liferay.aspectj)

module.framework.properties.org.osgi.framework.bootdelegation=\
        __redirected,\
        com.liferay.aspectj,\
        com.liferay.aspectj.*,\
        com.sun.ccpp,\
        com.sun.ccpp.*,\
        com.sun.crypto.*,\
        com.sun.image.*,\
        com.sun.jmx.*,\
        com.sun.jna,\
        com.sun.jndi.*,\
        com.sun.mail.*,\
        com.sun.management.*,\
        com.sun.media.*,\
        com.sun.msv.*,\
        com.sun.org.*,\
        com.sun.syndication,\
        com.sun.tools.*,\
        com.sun.xml.*,\
        com.yourkit.*,\
        sun.*\
	weblogic.jndi,\
	weblogic.jndi.*

DE-10 and onward (LPS-68753, added com.liferay.portal.servlet.delegate)

module.framework.properties.org.osgi.framework.bootdelegation=\
        __redirected,\
        com.liferay.aspectj,\
        com.liferay.aspectj.*,\
        com.liferay.portal.servlet.delegate,\
        com.liferay.portal.servlet.delegate*,\
        com.sun.ccpp,\
        com.sun.ccpp.*,\
        com.sun.crypto.*,\
        com.sun.image.*,\
        com.sun.jmx.*,\
        com.sun.jna,\
        com.sun.jndi.*,\
        com.sun.mail.*,\
        com.sun.management.*,\
        com.sun.media.*,\
        com.sun.msv.*,\
        com.sun.org.*,\
        com.sun.syndication,\
        com.sun.tools.*,\
        com.sun.xml.*,\
        com.yourkit.*,\
        sun.*\
	weblogic.jndi,\
	weblogic.jndi.*

Additional Information

See LPS-67662 for more information.

Was this article helpful?
0 out of 0 found this helpful