1 Reply Latest reply on Nov 15, 2012 10:33 AM by Constantine Vasilyev

    Specifying property file location for <ext:property-placeholder>

    Constantine Vasilyev Newbie

      in my blueprint XML I have the

       

      Is this the correct way of doing it? For some reason, when I start the bundle I get the FileNotFoundException for "etc/myCustomConfigSubfolder/custom.properties", although the file is definitely there. I have tried to specify the full path to the file as well, tried to move the file directly under /etc - just to be sure, but nothing works. Blueprint refuses to see it. I have looked at the Blueprint source code, see that it calls the openStream() method on the URL object. The file is definitely there, can't see why the URL would not be created. Any idea why this may be happening?

      Thanks!

        • 1. Re: Specifying property file location for <ext:property-placeholder>
          Constantine Vasilyev Newbie

          Can someone please explain/provide an example how to correctly point Blueprint configuration to an external properties file so that the ${...} placeholders in Blueprint bean definitions can be resolved? I thought the <ext:property-placeholder> /<ext:location> definition does just that, but, for some reason, it just does not recognize an existing file and throws a FileNotFoundException. (see the Blueprint config XML above.) What is missing?  Note, I am not talking about the ConfigAdmin properties, it is an external .properties file on the file system, e.g. placed under <karaf-home>/etc folder.

           

          Could this have anything to do with how Equinox resolves URLs? (I am using Equinox, but I think I am seeing the same results if I switch to Felix.)

           

          Thanks for your help!