SAML Plugin Throws NPE When Trying to Access Metadata

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

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