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

StackOverflowError when overriding login module language keys

    Details

    • Fix Priority:
      1

      Description

      When module language keys are overridden as described here https://dev.liferay.com/de/develop/reference/-/knowledge_base/7-1/resource-bundle-override, but instead of blog module the login module is used, it causes endless loop when the login page is displayed.

      It can be tested on this test case: https://github.com/jan-tosovsky-cz/liferay-overrides-login-test

      When the module is deployed, it correctly prints:

      mine: Sign In Overridden
      theirs: Sign In
      combined: Sign In Overridden

      It means in the init stage the language keys are merged correctly (mine wins).

      However, when the login page is displayed, the LoginResourceBundleLoader.loadResourceBundle(locale) is triggered which ends up with the endless loop.

      In the console there is the following output:

      loadResourceBundle: en_US
      0: java.lang.Thread.getStackTrace(Thread.java:1556)
      1: in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader.loadResourceBundle(LoginResourceBundleLoader.java:28)
      2: com.liferay.portal.language.extender.internal.LanguageExtension$ServiceTrackerResourceBundleLoader.loadResourceBundle(LanguageExtension.java:242)
      3: in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader.loadResourceBundle(LoginResourceBundleLoader.java:36)
      4: com.liferay.portal.language.extender.internal.LanguageExtension$ServiceTrackerResourceBundleLoader.loadResourceBundle(LanguageExtension.java:242)
      5: in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader.loadResourceBundle(LoginResourceBundleLoader.java:36)
      6: com.liferay.portal.language.extender.internal.LanguageExtension$ServiceTrackerResourceBundleLoader.loadResourceBundle(LanguageExtension.java:242)
      7: in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader.loadResourceBundle(LoginResourceBundleLoader.java:36)
      8: com.liferay.portal.language.extender.internal.LanguageExtension$ServiceTrackerResourceBundleLoader.loadResourceBundle(LanguageExtension.java:242)
      9: in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader.loadResourceBundle(LoginResourceBundleLoader.java:36)
      10: com.liferay.portal.language.extender.internal.LanguageExtension$ServiceTrackerResourceBundleLoader.loadResourceBundle(LanguageExtension.java:242)
      11: in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader.loadResourceBundle(LoginResourceBundleLoader.java:36)

       

      That LanguageExtension.java seems to be resolving same class repeatedly. Not sure why it happens for login portlet, but not for blogs portlet.

      If setResourceBundleLoader() method is modified and only my ResourceBundle is used (_resourceBundleLoader = mineResourceBundleLoader, it doesn't cause this error (but I am misissing global language keys) so the root cause is somewhere in the core ResourceBundle processing.

       

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              honyk Jan Tošovský
              Participants of an Issue:
              Recent user:
              Jan Tošovský
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                50 weeks, 3 days ago

                Packages

                Version Package