Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330314

Summary: BundleContext.installBundle cann't install bundle file whose path contains %20 instead of space
Product: [Eclipse Project] Equinox Reporter: viola.lu
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description viola.lu CLA 2010-11-16 03:25:17 EST
Build Identifier: org.eclipse.osgi 3.5.1.v20090827

1.I use BundleContext.installBundle("reference:file:/d:/a%20b/test.tmp"), but got an error
Caused by: java.io.FileNotFoundException: C:\Documents%20and%20Settings\myDir\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\geronimo-fileutils3448848740305009830.tmpfile
at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.connect(ReferenceURLConnection.java:46)
at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.getInputStream(ReferenceURLConnection.java:61)
at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:56)

If i change reference:file:/d:/a%20b/test.tmp to reference:file:/d:/a b/test.tmp, all works. I tested it on felix, but no problem like this.
So open a bug for this.

Reproducible: Always

Steps to Reproduce:
1.I use BundleContext.installBundle("reference:file:/d:/a%20b/test.tmp"), but got an error
Caused by: java.io.FileNotFoundException: C:\Documents%20and%20Settings\myDir\geronimo-tomcat7-javaee6-3.0-SNAPSHOT\var\temp\geronimo-fileutils3448848740305009830.tmpfile
at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.connect(ReferenceURLConnection.java:46)
at org.eclipse.osgi.framework.internal.protocol.reference.ReferenceURLConnection.getInputStream(ReferenceURLConnection.java:61)
at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:56)

2.If i change reference:file:/d:/a%20b/test.tmp to reference:file:/d:/a b/test.tmp, all works. 
3.I tested it on Felix, another osgi framework implementation, but no problem like this.
So open a bug for this.
Comment 1 Thomas Watson CLA 2010-11-16 07:40:01 EST
This has been fixed in 3.6.0

*** This bug has been marked as a duplicate of bug 290193 ***