<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>LR 7.1 - StackOverflowError when customizing language keys</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111338133" />
  <subtitle>LR 7.1 - StackOverflowError when customizing language keys</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111338133</id>
  <updated>2026-04-03T23:06:45Z</updated>
  <dc:date>2026-04-03T23:06:45Z</dc:date>
  <entry>
    <title>RE: LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111650717" />
    <author>
      <name>Michał Janusz</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111650717</id>
    <updated>2018-11-23T11:44:41Z</updated>
    <published>2018-11-23T11:44:41Z</published>
    <summary type="html">&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;Jan Tošovský:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;It is not resolved yet. Are you customizing login portlet or
        something else?&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes, I try to customize login portlet.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I've tested it on sample project:&lt;/p&gt;
&lt;p&gt;https://github.com/liferay/liferay-blade-samples/tree/7.1/maven/overrides/resource-bundle-override&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;It seems that the problem is only with login module. When I change
  other module like blog or journal it works fine.&lt;/p&gt;</summary>
    <dc:creator>Michał Janusz</dc:creator>
    <dc:date>2018-11-23T11:44:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111649671" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111649671</id>
    <updated>2018-11-23T10:29:59Z</updated>
    <published>2018-11-23T10:29:59Z</published>
    <summary type="html">&lt;p&gt;This issue has already been reported in &lt;a href="https://issues.liferay.com/browse/LPS-86878"&gt;https://issues.liferay.com/browse/LPS-86878&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That pom.xml comment was related to the test project &lt;a
  href="https://github.com/jan-tosovsky-cz/liferay-overrides-login-test"&gt;https://github.com/jan-tosovsky-cz/liferay-overrides-login-test&lt;/a&gt;
  which I created for that Jira ticket.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2018-11-23T10:29:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111649267" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111649267</id>
    <updated>2018-11-23T10:12:30Z</updated>
    <published>2018-11-23T10:12:30Z</published>
    <summary type="html">&lt;p&gt;I've just tested my customization in 7.1.1 and I am getting the same error.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Btw, for this newer version the kernel dependency in the pom.xml file
  must be updated to:&lt;/p&gt;
&lt;pre&gt;
&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;com.liferay.portal&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;com.liferay.portal.kernel&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;3.39.2&amp;lt;/version&amp;gt;
    &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/pre&gt;</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2018-11-23T10:12:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111642440" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111642440</id>
    <updated>2018-11-22T18:28:08Z</updated>
    <published>2018-11-22T18:28:08Z</published>
    <summary type="html">I noticed you referenced GA1 in yiour original post. 7.1 GA2 is out
now... do you still have the issue with the latest version?</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2018-11-22T18:28:08Z</dc:date>
  </entry>
  <entry>
    <title>RE: LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111641762" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111641762</id>
    <updated>2018-11-22T17:26:15Z</updated>
    <published>2018-11-22T17:26:15Z</published>
    <summary type="html">&lt;p&gt;It is not resolved yet. Are you customizing login portlet or
  something else?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In meantime I've seen various ways how resource bundles are
  overridden, in some portlets there are additional entries in bnd.bnd
  file, in other aggregating is done slightly differently. In sum, I
  think there are various approaches.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;But I still believe in documentation and I think this error is rather
  some bug in the login portlet, not in our approach (as it works in
  other portlet I tested).&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2018-11-22T17:26:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111640410" />
    <author>
      <name>Michał Janusz</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111640410</id>
    <updated>2018-11-22T16:20:04Z</updated>
    <published>2018-11-22T16:20:04Z</published>
    <summary type="html">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I encountered the same problem. Were you able to find a solution or
  workaround? If so could you please post it?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Michał&lt;/p&gt;</summary>
    <dc:creator>Michał Janusz</dc:creator>
    <dc:date>2018-11-22T16:20:04Z</dc:date>
  </entry>
  <entry>
    <title>LR 7.1 - StackOverflowError when customizing language keys</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111338132" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111338132</id>
    <updated>2018-10-26T12:44:06Z</updated>
    <published>2018-10-26T12:44:06Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I am trying to customize login module language keys following this tutorial:&lt;br&gt;&lt;a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/overriding-a-modules-language-keys"&gt;https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/overriding-a-modules-language-keys&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;@Component(
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; immediate = true,
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; property = {
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; "bundle.symbolic.name=com.liferay.login.web",
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; "resource.bundle.base.name=content.Language",
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; "servlet.context.name=login-web"
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; }
)
public class LoginResourceBundleLoader implements ResourceBundleLoader {

&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; private static final Log LOGGER = LogFactoryUtil.getLog(LoginResourceBundleLoader.class);

&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; @Override
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; public ResourceBundle loadResourceBundle(Locale locale) {
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; LOGGER.info("loadResourceBundle: " + locale.toString());
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; return _resourceBundleLoader.loadResourceBundle(locale);
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; }

&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; @Reference(
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; target = "(&amp;amp;amp;(bundle.symbolic.name=com.liferay.login.web)(!(component.name=in.drifted.liferay.overrides.login.keys.LoginResourceBundleLoader)))"
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; )
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; public void setResourceBundleLoader(ResourceBundleLoader resourceBundleLoader) {
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; _resourceBundleLoader = new AggregateResourceBundleLoader(new CacheResourceBundleLoader(new ClassResourceBundleLoader("content.Language", LoginResourceBundleLoader.class.getClassLoader())), resourceBundleLoader);
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; }

&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; private AggregateResourceBundleLoader _resourceBundleLoader;
}
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;However, there is a recursion in loadResourceBundle. In the log I can see over 1800 identical messages:&lt;pre&gt;&lt;code&gt;[LoginResourceBundleLoader:28] loadResourceBundle: en_US&lt;/code&gt;&lt;/pre&gt;which are followed by &lt;pre&gt;&lt;code&gt;[status_jsp:927] com.liferay.portal.kernel.portlet.PortletContainerException: javax.servlet.ServletException: java.lang.StackOverflowError&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Any idea how to fix this? &lt;br&gt;&lt;br&gt;LR 7.1 ga-1, tomcat 8.5&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2018-10-26T12:44:06Z</dc:date>
  </entry>
</feed>
