Uploaded image for project: 'JBoss Modules'
  1. JBoss Modules
  2. MODULES-378

Resource in modules.xml that references a directory link ignored when loading a resource bundle with ModuleClassLoader

    XMLWordPrintable

Details

    • Hide

      Create and deploy a module as described in the description
      Create a link from the target resource-root-path to a different directory
      Create a "test.properties" file in the directory
      Attempt to load a Resource Bundle from within a deployed application that uses that module:

      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      ResourceBundle resourceBundle = PropertyResourceBundle.getBundle("test", Locale.getDefault(), cl);
      

      throws a MissingResourceException

      Show
      Create and deploy a module as described in the description Create a link from the target resource-root-path to a different directory Create a "test.properties" file in the directory Attempt to load a Resource Bundle from within a deployed application that uses that module: ClassLoader cl = Thread .currentThread().getContextClassLoader(); ResourceBundle resourceBundle = PropertyResourceBundle.getBundle( "test" , Locale.getDefault(), cl); throws a MissingResourceException

    Description

      If a module is created with a file resource

      <module xmlns="urn:jboss:module:1.0" name="org.wf.test">
        <resources>
          <resource-root path="/opt/properties" name="properties" />
      

      and that path resource references a link to another filesystem directory, then that link is not read when attempting to load resources with a ModuleClassLoader

      Attachments

        Issue Links

          Activity

            People

              dlloyd@redhat.com David Lloyd
              andrewmorgan_jira Andrew Morgan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: