at the moment i'm developing an OSGi based WebApp with Jetty and Equinox (see: http://wiki.eclipse.org/Jetty/Tutorial/EclipseRT-Jetty-Starter-Kit). Everything ist fine so far but i can't get access to some files/resources of my own bundle. The location/path is "configuration/data/config.csv" and "configuration/data/data.zip". I have tested everything:
context.getBundleContext().getBundle().getEntry("config.csv");
context.getBundleContext().getBundle().getResource("config.csv");
this.getClass().getClassLoader().getResource("config.csv");
context.getBundleContext().getDataFile("config.csv");
And of course all possible path variants like: "configuration/data/config.csv", "/configuration/data/config.csv", "\configuration/data/config.csv", "/config.csv". Moreover i have added the folders to the OSGi classpath (in MANIFEST.MF):
Bundle-ClassPath: .,
configuration/data/
The resulting URL looks always somthing like this (or null): "configuration/CBR-Data/config.csv" and when i transfer it to an File object "D:\configuration\CBR-Data\config.csv".
But what i really don't understand is that the properties file for one of my DS is loaded perfectly:
<properties entry="configuration/dsconfig.properties"/>
Has someone an idea/tip or something else? I'm driving crazy...