Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-25235

SAML plugin is not deployable if keystore is not configured or it does not exist

    Details

      Description

      Add default configuration for keystore type and path and auto create empty keystore if it does not exist.

      9:30:21,999 ERROR [ContextLoader:227] Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.saml.credential.KeyStoreManager' defined in ServletContext resource [/WEB-INF/classes/META-INF/saml-spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.liferay.saml.credential.KeyStoreManagerImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      	at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:99)
      	at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:91)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:61)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:53)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
      	at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.contextInitialized(PortalClassLoaderServletContextListener.java:50)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.liferay.saml.credential.KeyStoreManagerImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
      	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
      	... 34 more
      Caused by: java.lang.NullPointerException
      	at com.liferay.saml.credential.KeyStoreManagerImpl.<init>(KeyStoreManagerImpl.java:38)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
      	... 36 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              mika.koivisto Mika Koivisto
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 28 weeks, 3 days ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.10 EE GA1
                  --Sprint 11/12
                  6.2.0 CE M2