0 Replies Latest reply on Mar 25, 2012 9:54 PM by mravi

    Reading property (xml) file.

    mravi

      Hi Guys,

       

      We are migrating from jboss-5.1.0.GA to jboss-7.1.1.Final and ran into an issue with file reading. We have an environment settings defined in an xml file. That is stored in ejb.jar that is deployed in the ear.

       

      We used the following code in 5.1.0GA.

       

      ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();

      URL fileURL = threadClassLoader.getResource(fileName);

      InputStream stream  = list.openStream();

       

      But I am not able to find this file in jboss-7.1.1.Final. (NullPointerException on openStream)

       

      The file in config/config.xml and it is in ejb.jar/config/config.xml in the deployment.

       

      Any idea what the issue is ?

       

      Thanks.