2 Replies Latest reply on Jul 12, 2011 12:50 AM by se.sheetal

    how to access the file present in jar file in jboss-5.0.0 GA

    se.sheetal

      Hi all,


      I am facing a problem and unable to get any solution if any one of you can help me out.

      I am upgrading from jboss4.2.3 to jboss 5.0.0 GA and while deploying my ear i am getting null pointer exception.

      In my ear I have a jar file, which contains a properties file say myFile.properties and I want to access this file in one of my java class which is also thr in the jar in pkg something like abc\efg\pkg1\pkg2\xyz.java.

       
      InputStream input = XYZ.class.getResourceAsStream("/myFile.properties");

       

      Here m getting a input as null.

       

      I guess its something related to classloaders :-( , the same thing works fine with jboss4.2.3.


      please provide your valuable solution and let me know in case any more info is reqd.

      Thanks in advance.