Cannot install bundle from URL with non-standard protocol
---------------------------------------------------------
Key: JBOSGI-495
URL:
https://issues.jboss.org/browse/JBOSGI-495
Project: JBoss OSGi
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossOSGi 1.0.0
Environment: Oracle JDK 1.6.0_26 64 bit, Ubuntu 11.04
Reporter: Harald Wellmann
Assignee: Thomas Diesler
Using the FrameworkFactory API, I cannot install a bundle from a non-standard URL with a
custom protocol handler:
{code}
String url = "mvn:org.ops4j.base/ops4j-base-lang/1.2.3";
Bundle bundle = bc.installBundle(url);
{code}
The mvn: protocol handler from the Maven artifact org.ops4j.pax.url:pax-url-aether:1.3.5
is enabled by setting
{code}
System.setProperty( "java.protocol.handler.pkgs", "org.ops4j.pax.url"
);
{code}
{{installBundle()}} throws an exception:
{noformat}
java.lang.IllegalArgumentException: Null path
at org.jboss.vfs.VFS.getChild(VFS.java:212)
at org.jboss.vfs.VFS.getChild(VFS.java:198)
at org.jboss.osgi.vfs30.VFSAdaptor30.toVirtualFile(VFSAdaptor30.java:57)
at org.jboss.osgi.vfs30.VFSAdaptor30.toVirtualFile(VFSAdaptor30.java:49)
at org.jboss.osgi.vfs.AbstractVFS.toVirtualFile(AbstractVFS.java:46)
at
org.jboss.osgi.framework.internal.AbstractBundleContext.installBundleInternal(AbstractBundleContext.java:165)
at
org.jboss.osgi.framework.internal.AbstractBundleContext.installBundle(AbstractBundleContext.java:120)
at
org.ops4j.pax.exam.regression.nat.jbosgi.MvnUrlTest.provisionMvnUrl(MvnUrlTest.java:67)
at org.ops4j.pax.exam.regression.nat.jbosgi.MvnUrlTest.jbosgiMvnUrl(MvnUrlTest.java:56)
{noformat}
When launching JBoss OSGi from the installer distribution via run.sh, I see the following
log message which might be related:
{noformat}
13:50:21,856 WARN [vfs] VFS was unable to set the URLStreamHandlerFactory. This will
have unpredictable results
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira