Legacy Knowledge Base
Published Jul. 2, 2025

SAML Plugin Throws NPE When Trying to Access Metadata

Written By

Brett Ripley

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

This article is a legacy article. It applies to previous versions of the Liferay product. While the article is no longer maintained, the information may still be applicable.

With "liferay-fix-pack-plugin-deployment-1-6120.zip" installed an error occurs while trying to access http://localhost:8080/c/portal/saml/metadata". When attempting access, "Internal Server Error" occurs in the page and the following exception is shown in the logs:

org.opensaml.saml2.metadata.provider.MetadataProviderException:java.lang.NullPointerException

Resolution

  1. Shutdown the Liferay Server.
  2. Clear Work and Temp folders from $APP_SERVER_HOME
  3. Delete the SAML plugin directory from your webapps directory in $APP_SERVER_HOME
  4. Please add the following property to your portal-ext.properties in addition to the SAML properties referred to in the guide:
    	hot.deploy.listeners=\
    	com.liferay.portal.deploy.hot.PluginPackageHotDeployListener,\
    
    	\
    
    	com.liferay.portal.deploy.hot.ServletContextListenerHotDeployListener,\
    
    	\
    
    	com.liferay.portal.deploy.hot.SpringHotDeployListener,\
    
    	\
    
    	com.liferay.portal.deploy.hot.ExtHotDeployListener,\
    
    	com.liferay.portal.deploy.hot.HookHotDeployListener,\
    
    	com.liferay.portal.deploy.hot.LayoutTemplateHotDeployListener,\
    
    	com.liferay.portal.deploy.hot.PortletHotDeployListener,\
    
    	com.liferay.portal.deploy.hot.SocialHotDeployListener,\
    
    	com.liferay.portal.deploy.hot.ThemeHotDeployListener,\
    
    	com.liferay.portal.deploy.hot.ThemeLoaderHotDeployListener,\
    
    	\
    
    	com.liferay.portal.deploy.hot.MessagingHotDeployListener
    	    
  5. Obtain the Plugin Deployment 1 fixpack.
  6. Place the liferay-fixpack-plugin-deployment-1-6120 in the /patching-tool/patches folder. By default, the patching-tool folder is located within $LIFERAY_HOME.
  7. Run patching-tool install to install the patch and execute patching-tool info to confirm.
  8. Deploy the SAML portlet again
  9. Restart the server.

Attempt to access http://localhost:8080/c/portal/saml/metadata

The XML content should be shown now.

Additional Information

See LPS-25238

Did this article resolve your issue ?

Legacy Knowledge Base