1 Reply Latest reply on Nov 15, 2002 3:26 AM by Sebastien ASTIE

    Properties File not found in Jar

    Sebastien ASTIE Newbie


      I use JBoss 3.0.3, I have a jar called ids.jar under server/default/lib. This jar contains a file scheduleServer.properties. This jar also contains a class called SchedulerPropertyManager that access the porperties file.

      The method that access the properties file is :

      public Properties loadResource(Properties prop, String resourceName) throws IOException {
      InputStream is = ClassLoader.getSystemResourceAsStream(resourceName);
      Properties result = null;
      if (is != null) {
      result = prop;
      else {
      throw new java.io.FileNotFoundException("Could not load resource " + resourceName);
      return result;

      I have a webApp called TestWar.war that contains a servlet that calls the previous method with resourceName being "scheduleServer.properties".

      When I call it I always get a fileNotFoundException.

      The same jar and the same war configuration under weblogic6.1 works great.

      Do I miss something ?