Search code examples
osgipax

Cannot use PAX-URL's assembly protocol with auto started bundles in Felix config.properties


I'm trying to use PAX-URL so I can have non-packed bundles assembled on the fly.

If I put pax-url-assembly-1.2.1.jar in the autostart bundles, and then type

install assembly:path/to/my/folder

everything works. The trouble is, I want to give felix those folders in the config file using > felix.auto.start.1=assembly:path/to/my/folder

If I do so, I get an "Unknown protocol: assembly" exception.

I've tried loading PAX-URL at level 1 and set the default start level of all other bundles to 10. Won't help. I think it's the "System Bundle" itself that reads the configuration before any bundle is loaded and therefore "assembly" is not understood.

My guess is I need to tell Felix to load PAX-URL right when Felix itself starts.

Any ideas? Did I get it all wrong? :)

Thanks!


Solution

  • Try putting PAX-URL into bundle folder in Apache Felix and launch it with -Djava.protocol.handler.pkgs=org.ops4j.pax.url options.

    Here is a post describing Apache Felix development in Eclipse