Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jack Bakker
SAML2 SP null pointer buildEntityDescriptor
August 20, 2013 10:08 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 840

Join Date: January 3, 2010

Recent Posts

Hi,

I set up IdP on EE v6.1 as per http://www.liferay.com/web/armin.dahncke/blog/-/blogs/setting-up-liferay-portal-6-1-ee-as-an-idp

I can see metadata at /c/portal/saml/metadata

I am trying to set up SP on EE v6.1 (in Developer Studio) as per http://www.liferay.com/web/armin.dahncke/blog/-/blogs/setting-up-liferay-portal-6-1-ee-as-a-sp

However, when I hit: /c/portal/saml/metadata on the SP Liferay I get:

17:00:39,235 ERROR [ajp-bio-8009-exec-1][status_jsp:665] org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
at com.liferay.saml.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:121)
at com.liferay.saml.metadata.MetadataManagerUtil.getEntityDescriptor(MetadataManagerUtil.java:48)
at com.liferay.saml.hook.action.MetadataAction.doExecute(MetadataAction.java:64)

...

Caused by: java.lang.NullPointerException
at com.liferay.saml.util.OpenSamlUtil.buildEntityDescriptor(OpenSamlUtil.java:246)
at com.liferay.saml.metadata.MetadataGeneratorUtil.buildSpEntityDescriptor(MetadataGeneratorUtil.java:128)
at com.liferay.saml.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:112)

---

As a related question, so I can step through source: what version of OpenSAML2 is the EE SAML2 plugin using ?
Jack Bakker
RE: SAML2 SP null pointer buildEntityDescriptor
August 28, 2013 12:13 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 840

Join Date: January 3, 2010

Recent Posts

Given I am EE customer, I will pick this up in LESA.
Mika Koivisto
RE: SAML2 SP null pointer buildEntityDescriptor
August 28, 2013 4:11 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1512

Join Date: August 7, 2006

Recent Posts

My immediate guess is that you don't have a private keys in the keystore with the same alias as the entityId.
Jack Bakker
RE: SAML2 SP null pointer buildEntityDescriptor
September 6, 2013 3:53 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 840

Join Date: January 3, 2010

Recent Posts

got a hot fix which solved it for now
Shankar Venkatasalam
RE: SAML2 SP null pointer buildEntityDescriptor
October 10, 2013 7:12 AM
Answer

Shankar Venkatasalam

Rank: New Member

Posts: 4

Join Date: February 16, 2011

Recent Posts

I am also EE customer and i am also having the same issue.
Mika, i check the entity id is the same.
Jack can you let me know about the Hot fix you got.

Thanks
Jack Bakker
RE: SAML2 SP null pointer buildEntityDescriptor
October 10, 2013 7:54 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 840

Join Date: January 3, 2010

Recent Posts

Jack can you let me know about the Hot fix you got.

Shankar, best you submit a ticket in LESA to get EE support. For me the fix was for LDS to make my LDS the same as my EE prod deploy.
Kailash Yadav
RE: SAML2 SP null pointer buildEntityDescriptor
October 11, 2013 10:53 AM
Answer

Kailash Yadav

Rank: Regular Member

Posts: 150

Join Date: October 18, 2011

Recent Posts

@Shankar Venkatasalam, I faced same error yesterday with LR6.1 EE. After checked this forum, I fixed the problem. I used wrong entityId as mika said above, And now it is working fine without any hotfix. Please check again your configuration,
Salman Jan
RE: SAML2 SP null pointer buildEntityDescriptor
November 25, 2014 9:35 AM
Answer

Salman Jan

Rank: New Member

Posts: 4

Join Date: August 17, 2011

Recent Posts

I am seeing the same error, we have deployed Liferay SAML2.0 SSO Hook version SAML2.0ProviderEE6.1.GA2+.lpkg on our Liferay 6.1.2 EE server.

When starting Liferay we are seeing the following error:
Loading zip:/app/domains/portal/liferay61/servers/AdminServer/tmp/_WL_user/saml-portlet/keu8h8/war/WEB-INF/lib/_wl_cls_gen.jar!/service.properties
Loading zip:/app/domains/portal/liferay61/servers/AdminServer/tmp/_WL_user/saml-portlet/keu8h8/war/WEB-INF/lib/_wl_cls_gen.jar!/service.properties
04:57:02,456 ERROR [ ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'][HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.H
otDeployException: Error registering servlet context listeners for saml-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering servlet context listeners for saml-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.ServletContextListenerHotDeployListener.invokeDeploy(ServletContextListenerHotDeployListener.java:37)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:216)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)


Moreover, when calling the metadata URL getting the following error:

05:13:08,124 ERROR [ ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'][BaseSamlStrutsAction:45] org.opensaml.saml2.metadata.prov
ider.MetadataProviderException: java.lang.NullPointerException
org.opensaml.saml2.metadata.provider.MetadataProviderException: java.lang.NullPointerException
at com.liferay.saml.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:180)
at com.liferay.saml.metadata.MetadataManagerUtil.getEntityDescriptor(MetadataManagerUtil.java:52)
at com.liferay.saml.hook.action.MetadataAction.doExecute(MetadataAction.java:41)
at com.liferay.saml.hook.action.BaseSamlStrutsAction.execute(BaseSamlStrutsAction.java:42)
at com.liferay.portal.kernel.struts.BaseStrutsAction.execute(BaseStrutsAction.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)


The same error have been reported in this blog and the user is suggesting the Liferay provided a fix liferay-hotfix-1552-6120 .
http://www.liferay.com/web/mika.koivisto/blog/-/blogs/getting-started-with-liferay-saml-2-0-identity-provider

Liferay is being used as SAML idP. Here is the snippet of the config:

#
#SAML2.0 SSO Configuration
#
saml.enabled=true
saml.role=idp
saml.entity.id=samlidpdev
saml.require.ssl=false
saml.sign.metadata=true
saml.idp.authn.request.signature.required=true
#saml.metadata.paths=https://portaldev-liferay.sita.aero/c/portal/saml/metadata
saml.keystore.type=jks
saml.keystore.path=/app/doc_share/liferaySixDotOne/saml/idp/keystore.jks
saml.keystore.password=password
saml.keystore.credential.password=password


SAML2.0 SSO Version 1.0.2 which is good for 6.1 GA2+ EE

The entity ID matches the one on the keystore. Ayy ideas

Pls advise