Issue
- When clicking on the "OAuth 2 Administration" option in the Control Panel, the following error is logged, and the UI displays an unresolved Velocity variable (
${processor.processMax()}):
Unable to execute method processMax {exception=com.liferay.portal.kernel.portlet.PortletContainerException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.proxy.$Proxy12536, className=com.liferay.portal.layoutconfiguration.util.velocity.TemplateProcessor} com.liferay.portal.kernel.portlet.PortletContainerException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.proxy.$Proxy12536
Environment
- Liferay DXP 7.4 +
Resolution
- The issue was traced to an overridden
bootdelegationconfiguration in theportal-ext.propertiesfile. - This configuration interferes with the OSGi class loading mechanism, resulting in a
NoClassDefFoundErrorand failure to initialize theTemplateProcessorproxy class. -
To fix the issue, remove the following property from your
portal-ext.propertiesfile:## For AppD
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.*,\
org.apache.poi,\
org.apache.poi.*,\
net.sf.jasperreports,\
net.sf.jasperreports.*,\
com.lowagie,\
com.lowagie.*,\
org.apache.commons.logging,\
org.apache.commons.logging.*,\
org.apache.commons.digester,\
org.apache.commons.digester.*,\
org.apache.commons.collections4,\
org.apache.commons.collections4.*,\
org.apache.commons.collections,\
org.apache.commons.collections.*,\
org.apache.commons.codec,\
org.apache.commons.codec.*,\
org.apache.commons.beanutils,\
org.apache.commons.beanutils.*,\
org.bouncycastle,\
org.bouncycastle.*,\
com.singularity.* - After removing the property, perform a clean server restart to ensure all changes take effect.