0

I have propertyResourceConfigurer as below

<context:property-placeholder
        ignore-resource-not-found="false" ignore-unresolvable="true"
        location="${karaf.home}/product/properties/device.properties,file:${karaf.home}/product/properties/device.properties,file:///${karaf.home}/product/properties/device.properties"/>

when i deploy the jar in my karaf container, I am getting an exception as below

org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: OSGi resource[/opt/product/properties/device.properties.

I am using a relative path in my linux environment, as you can see i have tried multiple locations and none can resolve the properties file.

I am out of ideas, please help. Thank you in advance.

  • just file:${karaf.home}/product/properties/device.properties should work? any reason why you are seems to be added multiple locations of same path? – kuhajeyan Nov 02 '16 at 05:26
  • i just don't know they resolve to the same path. file:product/properties/device.properties without the karaf part.Thanks. – Srikanth Chadalavada Nov 02 '16 at 19:47

0 Answers0