9 Replies Latest reply on Dec 18, 2012 7:26 PM by choonny

    Thread.currentThread().getContextClassLoader().getResource(....) null

    choonny

      Hi,

       

      I am getting a null resource even after adding the custom configuration folder in the module directory.

      All I am trying to do in my code is this:

      URL url = Thread.currentThread().getContextClassLoader().getResource("settings/" + <sName> + "/" + <fileName>);

       

      In JBOSS 5 or 6, the code is able to get the files in the following folder structure:

      <jboss installation>\server\<servername>\settings\<sname>\<fileName>

       

      Below are what I have in my custom modules:

      modules\com\<companyname>\configuration\props

      modules\com\<companyname>\configuration\props\settings

      modules\com\<companyname>\configuration\props\settings\<sName>

      modules\com\<companyname>\configuration\props\settings\<sName>\<fileName>

      modules\come\<companyname>configuration\module.xml