You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Elliot Huntington <el...@gmail.com> on 2015/08/24 02:16:10 UTC

Felix configuration - relative urls

Is there a way to specify relative urls in the
felix/conf/conf/config.properties file?

For example, I need to use Apache Aries dynamic weaving to integrate the
mp3spi jar into the osgi container. This means that the aries dynamic
weaving libraries need to be started before any of the other bundles that
depend on them. I'm trying to do this with the following configuration
parameters:

felix.auto.deploy.dir=bundle/auto
felix.auto.deploy.action=install,start
felix.startlevel.bundle=2
felix.auto.start.1= \
  bundle/aries/asm-all-4.0.jar \
  bundle/aries/org.apache.aries.spifly.dynamic.bundle-1.0.0.jar \
  bundle/aries/org.apache.aries.util-1.1.0.jar
org.osgi.framework.startlevel.beginning=5

My strategy is to bump the start level of all the auto installed/started
bundles to 2, and then auto start the aries bundles with a start level of
1. But when I use the above configuration the felix container reports the
following error:

Auto-properties install: bundle/aries/org.apache.aries.util-1.1.0.jar
(org.osgi.framework.BundleException: Unable to cache bundle:
bundle/aries/org.apache.aries.util-1.1.0.jar -
java.net.MalformedURLException: no protocol:
bundle/aries/org.apache.aries.util-1.1.0.jar)
org.osgi.framework.BundleException: Unable to cache bundle:
bundle/aries/org.apache.aries.util-1.1.0.jar
    at org.apache.felix.framework.Felix.installBundle(Felix.java:2969)
    at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:167)
    at
org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:311)
    at org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:94)
    at org.apache.felix.main.Main.main(Main.java:292)
Caused by: java.net.MalformedURLException: no protocol:
bundle/aries/org.apache.aries.util-1.1.0.jar
    at java.net.URL.<init>(URL.java:586)
    at
org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:255)
    at
org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148)
    at
org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)
    at
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
    at
org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
    at
org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
    at
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
    at org.apache.felix.framework.Felix.installBundle(Felix.java:2965)
    ... 4 more


I do not want to specify a hard coded file:/// url for this. Maybe I am
taking the wrong approach for this anyway? Any suggestions are welcomed.

Thank you.