Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9131

Wildfly 10.1.0 Fails to load JSF message bundle from Java class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 10.1.0.Final
    • JSF
    • None
    • Windows 10
      Wildfly 10.1.0

    • Hide

      Build war project with JSF application section referring to Java class based resource bundle
      Deploy war on EAP 6.4
      Notice that application correctly resolves JSF bundle references.
      Deploy war on Wildfly 10.1.0
      Notice that application does not correctly resolve JSF bundle references.

      Show
      Build war project with JSF application section referring to Java class based resource bundle Deploy war on EAP 6.4 Notice that application correctly resolves JSF bundle references. Deploy war on Wildfly 10.1.0 Notice that application does not correctly resolve JSF bundle references.

      Have a war application which deploys and runs correctly on EAP 6.4. When deploying on WIldfly 10.1.0, none of the message bundle lookups work, resulting in ?zxcv? text on JSF pages.
      This application has the following in faces-config.xml:
      <application>
      <locale-config>
      <default-locale>en</default-locale>
      <supported-locale>en_US</supported-locale>
      <supported-locale>en</supported-locale>
      </locale-config>
      <message-bundle>com.rfdinc.efile.bp.resources.CombinedMessageResources</message-bundle>
      <resource-bundle>
      <base-name>com.rfdinc.efile.bp.resources.CombinedMessageResources</base-name>
      <var>msg</var>
      </resource-bundle>
      </application>

      Here, com.rfdinc.efile.bp.resources.CombinedMessageResources is a Java class which extends java.util.ResourceBundle and implements most of the methods of java.util.ResourceBundle.

      This technique works correctly under EAP 6.4. Under Wildfly 10.1.0, however, none of the class methods ever get called. This was verified by placing logger messages throughout com.rfdinc.efile.bp.resources.CombinedMessageResources.

      Replacing <message-bundle> and <base-name> with a 'properties' file works, but this particular Java class allows us to combine multiple property files into a single resource bundle.

              jaslee@redhat.com Jason Lee
              rmoyersrfd Bobby Bassman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: