1 Reply Latest reply on Jul 10, 2012 10:30 PM by Freeman(Yue) Fang

    Read properties file in Fuse ESB 7.0

    Alan Teodoro Newbie

      I have a third party jar file that reads a properties file like this: InputStream inputstream = Thread.currentThread().getContextClassLoader().getResourceAsStream("file.properties");... it is returning null because it is problably not finding the file.properties in the classpath and I don't know where to put so it can be found...

       

      I already tried to change the config.properties to add in the $ e $, tried to add the properties in most of the directories but still getting the error...

       

      I can't change the way it reads the properties, so I need to know how to make it happens... Thanks !

        • 1. Re: Read properties file in Fuse ESB 7.0
          Freeman(Yue) Fang Master

          Hi,

           

          You can enable remote debug and set break point on the line

          Thread.currentThread().getContextClassLoader().getResourceAsStream("file.properties");

          to see what's the TCCL is, if it's the bundle classloader, then you have to put the file.properties in that bundle.

           

          Anyway you can try to put file.properties in $FUSE_HOME or $FUSE_HOME/etc folder to see if it helps, but I guess you've already tried it.

           

          Freeman