Use FrameworkUtil to retrive the osgi bundle and FileLookup to retrieve ...

Sometimes ((BundleReference) OsgiClassLoader.class.getClassLoader()).getBundle()
returns null. To fix that use FrameworkUtil to retrive the osgi bundle [1]

Use FileLookup to find the resources on OSGI classpath as files for InfinispanEmbeddedServiceFactory are loaded by other bundles and not accessible using its class loader.

[1] http://grepcode.com/file/repo1.maven.org/maven2/org.osgi/org.osgi.core/4.2.0/org/osgi/framework/FrameworkUtil.java#FrameworkUtil.getBundle%28java.lang.Class%29
Actually I install the files using features as following:
    <feature name="cache-instance" resolver="(obr)" version="${project.version}">
        <configfile finalname="/etc/jgroups-tcp-sample.xml">mvn:com.ofbizian/cache-instance/${project.version}/xml/jgroups-tcp-sample</configfile>
        <configfile finalname="/etc/jgroups-udp-sample.xml">mvn:com.ofbizian/cache-instance/${project.version}/xml/jgroups-udp-sample</configfile>
        <configfile finalname="/etc/infinispan.xml">mvn:com.ofbizian/cache-instance/${project.version}/xml/infinispan</configfile>
        <configfile finalname="/etc/org.infinispan.manager.embedded-default.cfg">mvn:com.ofbizian/cache-instance/${project.version}/cfg/infinispan</configfile>
    </feature>
That puts the necessary files in the etc folder of karaf/fuse. And sometimes I use absolute path to access the all these files. Basically the bundle should be able to access files from these locations too. It is very common to put config files in karaf/etc folder or on a location outside of karaf for easy editing.