Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-6112

Repository.getCompanyHome() invocation fails

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1.2
    • Component/s: Installer
    • Labels:
      None
    • Bug Priority:
      Category 1

      Description

      Repository.getCompanyHome() invocation failes with null pointer exception:

      13:53:40,406 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'get-company-home-fail-bean' defined in file [/home/lx/alfresco-4.1.0/tomcat/shared/classes/alfresco/extension/fail-context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
      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:276)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
      at org.apache.catalina.core.StandardService.start(StandardService.java:525)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
      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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.lang.NullPointerException
      at org.alfresco.repo.model.Repository.getCompanyHome(Repository.java:231)
      at fail.GetCompanyHomeFail$1.doWork(GetCompanyHomeFail.java:19)
      at fail.GetCompanyHomeFail$1.doWork(GetCompanyHomeFail.java:1)
      at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:516)
      at org.alfresco.repo.security.authentication.AuthenticationUtil.runAsSystem(AuthenticationUtil.java:550)
      at fail.GetCompanyHomeFail.afterPropertiesSet(GetCompanyHomeFail.java:16)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
      ... 37 more

      After debugging Alfresco with Eclipse I've found that the problem is in this line:

      NodeRef companyHomeRef = companyHomeRefs.get(tenantDomain);

      companyHomeRefs is null.

        Attachments

          Activity

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              fufler Alexey Ermakov
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: