[jboss-osgi-issues] [JBoss JIRA] (JBOSGI-600) Installing bundle from streams does not work

Guillaume Nodet (JIRA) jira-events at lists.jboss.org
Tue Sep 4 05:15:33 EDT 2012


     [ https://issues.jboss.org/browse/JBOSGI-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated JBOSGI-600:
-----------------------------------

    Summary: Installing bundle from streams does not work  (was: Installing bundle using the Framework api fails)

    
> Installing bundle from streams does not work
> --------------------------------------------
>
>                 Key: JBOSGI-600
>                 URL: https://issues.jboss.org/browse/JBOSGI-600
>             Project: JBoss OSGi
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Guillaume Nodet
>            Assignee: Thomas Diesler
>
> Installing bundles using the framework API fails because URL handlers may have not been installed yet.  This happen when passing directly a stream to the 
> bundle, which should avoid the need of having the url handler.
> {code}
> java.lang.IllegalArgumentException: JBOSGI010304: Invalid root file: "/stream1346689295915"
> 	at org.jboss.osgi.spi.BundleInfo.toURL(BundleInfo.java:322)
> 	at org.jboss.osgi.spi.BundleInfo.<init>(BundleInfo.java:121)
> 	at org.jboss.osgi.spi.BundleInfo.createBundleInfo(BundleInfo.java:109)
> 	at org.jboss.osgi.framework.internal.DeploymentFactoryPlugin.createDeployment(DeploymentFactoryPlugin.java:89)
> 	at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundleInternal(AbstractBundleContext.java:176)
> 	at org.jboss.osgi.framework.internal.AbstractBundleContext.installBundle(AbstractBundleContext.java:118)
> 	at org.apache.karaf.main.Main.autoInstall(Main.java:685)
> 	at org.apache.karaf.main.Main.processAutoProperties(Main.java:650)
> 	at org.apache.karaf.main.Main.launch(Main.java:292)
> 	at org.apache.karaf.main.Main.main(Main.java:497)
> Caused by: java.net.MalformedURLException: unknown protocol: vfs
> 	at java.net.URL.<init>(URL.java:574)
> 	at java.net.URL.<init>(URL.java:464)
> 	at java.net.URL.<init>(URL.java:413)
> 	at java.net.URI.toURL(URI.java:1080)
> 	at org.jboss.vfs.VFSUtils.getVirtualURL(VFSUtils.java:503)
> 	at org.jboss.vfs.VirtualFile.toURL(VirtualFile.java:453)
> 	at org.jboss.osgi.vfs30.VirtualFileAdaptor30.toURL(VirtualFileAdaptor30.java:162)
> 	at org.jboss.osgi.spi.BundleInfo.toURL(BundleInfo.java:320)
> 	... 9 more
> {code}
> The code comes from Karaf and works fine on both Equinox and Felix.
> I'd suggest changing the BundleInfo#rootURL field into a URI to avoid the conversion to URL which does a lookup of the URL handler.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-osgi-issues mailing list