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

NPE is thrown when restarting portal with Spanish only

    Details

      Description

      Steps to Reproduce

      1. Go to Control Panel > CONFIGURATION > Instance Settings > Localization > Language
      2. Remove all languages from Current list, only remain Spanish (Spain)
      3. Change the Default Language to use Spanish (Spain)
      4. Save
      5. Log out and login portal
      6. Shut down portal and restart portal

      Expect Result
      User should be able to login portal without errors.

      Actual Result
      NPE is thrown and home page is blank.

      2021-06-09 07:13:13.137 ERROR [main][CompanyThreadLocal:205] java.lang.NullPointerException
      java.lang.NullPointerException: null
              at com.liferay.portal.language.LanguageImpl$CompanyLocalesBag.<init>(LanguageImpl.java:2112) ~[portal-impl.jar:?]
              at com.liferay.portal.language.LanguageImpl$CompanyLocalesBag.<init>(LanguageImpl.java:2051) ~[portal-impl.jar:?]
              at com.liferay.portal.language.LanguageImpl._getCompanyLocalesBag(LanguageImpl.java:1742) ~[portal-impl.jar:?]
              at com.liferay.portal.language.LanguageImpl._getCompanyLocalesBag(LanguageImpl.java:1734) ~[portal-impl.jar:?]
              at com.liferay.portal.language.LanguageImpl.isAvailableLocale(LanguageImpl.java:1596) ~[portal-impl.jar:?]
              at com.liferay.portal.language.LanguageImpl.isAvailableLocale(LanguageImpl.java:1528) ~[portal-impl.jar:?]
              at com.liferay.portal.kernel.language.LanguageUtil.isAvailableLocale(LanguageUtil.java:324) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.util.LocaleUtil._fromLanguageId(LocaleUtil.java:276) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.util.LocaleUtil._fromLanguageId(LocaleUtil.java:219) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.util.LocaleUtil.fromLanguageId(LocaleUtil.java:98) ~[portal-kernel.jar:?]
              at com.liferay.portal.model.impl.UserImpl.setLanguageId(UserImpl.java:885) ~[portal-impl.jar:?]
              at com.liferay.portal.kernel.security.auth.CompanyThreadLocal._fetchDefaultUser(CompanyThreadLocal.java:165) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.security.auth.CompanyThreadLocal._setCompanyId(CompanyThreadLocal.java:189) [portal-kernel.jar:?]
              at com.liferay.portal.kernel.security.auth.CompanyThreadLocal.setWithSafeCloseable(CompanyThreadLocal.java:118) [portal-kernel.jar:?]
              at com.liferay.portal.service.impl.CompanyLocalServiceImpl.forEachCompany(CompanyLocalServiceImpl.java:471) [portal-impl.jar:?]
              at com.liferay.portal.service.impl.CompanyLocalServiceImpl.forEachCompany(CompanyLocalServiceImpl.java:460) [portal-impl.jar:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) [portal-impl.jar:?]
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) [portal-impl.jar:?]
              at com.sun.proxy.$Proxy96.forEachCompany(Unknown Source) [?:?]
              at com.liferay.portal.kernel.service.CompanyLocalServiceUtil.forEachCompany(CompanyLocalServiceUtil.java:340) [portal-kernel.jar:?]
              at com.liferay.portal.util.PortalInstances.getWebIds(PortalInstances.java:218) [portal-impl.jar:?]
              at com.liferay.portal.internal.servlet.MainServlet._initCompanies(MainServlet.java:794) [portal-impl.jar:?]
              at com.liferay.portal.internal.servlet.MainServlet.init(MainServlet.java:421) [portal-impl.jar:?]
              at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:4.0.FR]
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:983) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4902) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5211) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.43]
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) [catalina.jar:9.0.43]
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706) [catalina.jar:9.0.43]
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:623) [catalina.jar:9.0.43]
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1774) [catalina.jar:9.0.43]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]
              at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.43]
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) [?:1.8.0_91]
              at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) [catalina.jar:9.0.43]
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424) [catalina.jar:9.0.43]
              at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520) [catalina.jar:9.0.43]
              at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) [catalina.jar:9.0.43]
              at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.43]
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [catalina.jar:9.0.43]
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [catalina.jar:9.0.43]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]
              at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-util.jar:9.0.43]
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [?:1.8.0_91]
              at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardService.startInternal(StandardService.java:434) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.43]
              at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) [catalina.jar:9.0.43]
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.43]
              at org.apache.catalina.startup.Catalina.start(Catalina.java:772) [catalina.jar:9.0.43]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) [bootstrap.jar:9.0.43]
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.43]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joyce.wang Joyce Wang
              Reporter:
              joyce.wang Joyce Wang
              Participants of an Issue:
              Recent user:
              Sophia Zhang
              Engineering Assignee:
              Pei-Jung Lan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                14 weeks, 6 days ago

                  Packages

                  Version Package
                  7.4.1 CE GA2 DXP 7,4
                  Master