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

StackOverflow when en_US is not included among the locales of the portal

    Details

      Description

      It can be reproduced in 6.1 EE GA2 + fix-pack-core-5 or 6.1.x and in master branch

      STEPS TO REPRODUCE
      1. Start liferay.
      2. Include the following properties in portal-ext.properties:

      • For master:

      locales=es_ES
      locales.enabled=es_ES
      company.default.locale=es_ES

      • For 6.1.x

      locales=es_ES
      company.default.locale=es_ES

      3. Restart liferay.
      4. In a browser, go to a URL of a not supported language like:
      http://localhost:8080/pt_BR
      http://localhost:8080/en_US

      ACTUAL RESULT
      The page is not displayed and the following exceptions appears in the log files:

      Caused by: java.lang.StackOverflowError
      	at java.lang.ThreadLocal.get(ThreadLocal.java:125)
      	at com.liferay.portal.kernel.util.CentralizedThreadLocal._getThreadLocalMap(CentralizedThreadLocal.java:154)
      	at com.liferay.portal.kernel.util.CentralizedThreadLocal.get(CentralizedThreadLocal.java:82)
      	at com.liferay.portal.security.auth.CompanyThreadLocal.getCompanyId(CompanyThreadLocal.java:32)
      	at com.liferay.portal.language.LanguageImpl._getInstance(LanguageImpl.java:754)
      	at com.liferay.portal.language.LanguageImpl.getLocale(LanguageImpl.java:532)
      	at sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
      	at $Proxy43.getLocale(Unknown Source)
      	at com.liferay.portal.kernel.language.LanguageUtil.getLocale(LanguageUtil.java:232)
      	at com.liferay.portal.language.LanguageResources.getSuperLocale(LanguageResources.java:103)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      	at com.liferay.portal.language.LanguageResources.getMessage(LanguageResources.java:86)
      

      EXPECTED RESULT
      Tha page should appear although with the texts in English

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 50 weeks, 2 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.0 CE B2