diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Repository.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Repository.java
index 9ee805b..6794222 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Repository.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Repository.java
@@ -39,8 +39,6 @@
 // turn this draft into an official specification.  
 package org.apache.felix.bundlerepository;
 
-import java.net.URL;
-
 /**
  * Represents a repository.
  * 
@@ -48,11 +46,22 @@
  */
 public interface Repository
 {
+
+    /**
+     * URI identifying the system repository
+     */
+    String SYSTEM = "system";
+
+    /**
+     * URI identiying the local repository
+     */
+    String LOCAL = "local";
+
     /**
      * Return the associated URL for the repository.
      * 
      */
-    URL getURL();
+    String getURI();
 
     /**
      * Return the resources for this repository.
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RepositoryAdmin.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RepositoryAdmin.java
index 5b69004..f43ba62 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RepositoryAdmin.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/RepositoryAdmin.java
@@ -119,9 +119,20 @@
 
     /**
      * Add a new repository to the federation.
-     * 
+     *
      * The url must point to a repository XML file.
-     * 
+     *
+     * @param repository
+     * @return
+     * @throws Exception
+     */
+    Repository addRepository(String repository) throws Exception;
+
+    /**
+     * Add a new repository to the federation.
+     *
+     * The url must point to a repository XML file.
+     *
      * @param repository
      * @return
      * @throws Exception
@@ -136,7 +147,7 @@
      * @param repository
      * @return
      */
-    boolean removeRepository(URL repository);
+    boolean removeRepository(String repository);
 
     /**
      * List all the repositories.
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Resource.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Resource.java
index 9af2de6..1208b31 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Resource.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/Resource.java
@@ -39,7 +39,6 @@
 // turn this draft into an official specification.  
 package org.apache.felix.bundlerepository;
 
-import java.net.URL;
 import java.util.Map;
 
 import org.osgi.framework.Version;
@@ -54,17 +53,17 @@
  */
 public interface Resource
 {
-    final String LICENSE_URL = "license";
+    final String LICENSE_URI = "license";
 
     final String DESCRIPTION = "description";
 
-    final String DOCUMENTATION_URL = "documentation";
+    final String DOCUMENTATION_URI = "documentation";
 
     final String COPYRIGHT = "copyright";
 
-    final String SOURCE_URL = "source";
+    final String SOURCE_URI = "source";
 
-    final String JAVADOC_URL = "javadoc";
+    final String JAVADOC_URI = "javadoc";
 
     final String SYMBOLIC_NAME = "symbolicname";
 
@@ -92,7 +91,7 @@
 
     String getId();
 
-    URL getURL();
+    String getURI();
 
     Requirement[] getRequirements();
 
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalRepositoryImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalRepositoryImpl.java
index 038ff10..deb984d 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalRepositoryImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalRepositoryImpl.java
@@ -18,7 +18,6 @@
  */
 package org.apache.felix.bundlerepository.impl;
 
-import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -123,9 +122,9 @@
         m_context.removeServiceListener(this);
     }
 
-    public URL getURL()
+    public String getURI()
     {
-        return null;
+        return LOCAL;
     }
 
     public String getName()
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
index 72fd15e..17c3a84 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
@@ -176,7 +176,7 @@
             }
             else if (key.equalsIgnoreCase("Bundle-Source"))
             {
-                put(SOURCE_URL, (String) dict.get(key));
+                put(SOURCE_URI, (String) dict.get(key));
             }
             else if (key.equalsIgnoreCase(Constants.BUNDLE_DESCRIPTION))
             {
@@ -184,7 +184,7 @@
             }
             else if (key.equalsIgnoreCase(Constants.BUNDLE_DOCURL))
             {
-                put(DOCUMENTATION_URL, (String) dict.get(key));
+                put(DOCUMENTATION_URI, (String) dict.get(key));
             }
             else if (key.equalsIgnoreCase(Constants.BUNDLE_COPYRIGHT))
             {
@@ -192,7 +192,7 @@
             }
             else if (key.equalsIgnoreCase("Bundle-License"))
             {
-                put(LICENSE_URL, (String) dict.get(key));
+                put(LICENSE_URI, (String) dict.get(key));
             }
         }
     }
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrCommandImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrCommandImpl.java
index 6637974..47c2e29 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrCommandImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrCommandImpl.java
@@ -157,33 +157,26 @@
         {
             while (st.hasMoreTokens())
             {
-                if (command.equals(ADDURL_CMD))
+                try
                 {
-                    try
+                    String uri = st.nextToken();
+                    if (command.equals(ADDURL_CMD))
                     {
-                        m_repoAdmin.addRepository(new URL(st.nextToken()));
+                        m_repoAdmin.addRepository(uri);
                     }
-                    catch (Exception ex)
+                    else if (command.equals(REFRESHURL_CMD))
                     {
-                        ex.printStackTrace(err);
+                        m_repoAdmin.removeRepository(uri);
+                        m_repoAdmin.addRepository(uri);
                     }
-                } 
-                else if (command.equals(REFRESHURL_CMD))
-                {
-                    try
+                    else
                     {
-                        URL url = new URL(st.nextToken());
-                        m_repoAdmin.removeRepository(url);
-                        m_repoAdmin.addRepository(url);
-                    }
-                    catch (Exception ex)
-                    {
-                        ex.printStackTrace(err);
+                        m_repoAdmin.removeRepository(uri);
                     }
                 }
-                else
+                catch (Exception ex)
                 {
-                    m_repoAdmin.removeRepository(new URL(st.nextToken()));
+                    ex.printStackTrace(err);
                 }
             }
         }
@@ -194,7 +187,7 @@
             {
                 for (int i = 0; i < repos.length; i++)
                 {
-                    out.println(repos[i].getURL());
+                    out.println(repos[i].getURI());
                 }
             }
             else
@@ -444,11 +437,11 @@
             }
             else
             {
-                URL srcURL = (URL) resource.getProperties().get(Resource.SOURCE_URL);
-                if (srcURL != null)
+                String srcURI = (String) resource.getProperties().get(Resource.SOURCE_URI);
+                if (srcURI != null)
                 {
                     FileUtil.downloadSource(
-                        out, err, srcURL, pc.getDirectory(), pc.isExtract());
+                        out, err, new URL(srcURI), pc.getDirectory(), pc.isExtract());
                 }
                 else
                 {
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrURLStreamHandlerService.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrURLStreamHandlerService.java
index 35a26ca..a99d4eb 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrURLStreamHandlerService.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ObrURLStreamHandlerService.java
@@ -183,7 +183,7 @@
         ResourceSelectionStrategy strategy = new NewestSelectionStrategy(m_logger);
         Resource selected = strategy.selectOne(Version.emptyVersion, discoverResources);
 
-        return selected.getURL();
+        return new URL(selected.getURI());
     }
 
     private boolean validateFilter(String filter) {
@@ -227,7 +227,7 @@
         Resource selected = strategy.selectOne(
             Version.parseVersion(version), discoverResources);
 
-        return selected.getURL();
+        return new URL(selected.getURI());
     }
 
     private ResourceSelectionStrategy getStrategy(String strategy)
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
index f169eed..09eb837 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryAdminImpl.java
@@ -18,7 +18,6 @@
  */
 package org.apache.felix.bundlerepository.impl;
 
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -45,7 +44,6 @@
     private final Logger m_logger;
     private final SystemRepositoryImpl m_system;
     private final LocalRepositoryImpl m_local;
-    private List m_urlList = new ArrayList();
     private Map m_repoMap = new HashMap();
     private boolean m_initialized = false;
 
@@ -78,6 +76,11 @@
         m_local.dispose();
     }
 
+    public Repository addRepository(String uri) throws Exception
+    {
+        return addRepository(new URL(uri));
+    }
+
     public Repository addRepository(URL url) throws Exception
     {
         return addRepository(url, Integer.MAX_VALUE);
@@ -85,40 +88,34 @@
 
     public synchronized RepositoryImpl addRepository(URL url, int hopCount) throws Exception
     {
-        if (!m_urlList.contains(url))
-        {
-            m_urlList.add(url);
-        }
+        initialize();
 
         // If the repository URL is a duplicate, then we will just
         // replace the existing repository object with a new one,
         // which is effectively the same as refreshing the repository.
         RepositoryImpl repo = new RepositoryImpl(this, url, hopCount, m_logger);
-        m_repoMap.put(url, repo);
+        m_repoMap.put(url.toExternalForm(), repo);
         return repo;
     }
 
-    public synchronized boolean removeRepository(URL url)
+    public synchronized boolean removeRepository(String uri)
     {
-        m_repoMap.remove(url);
-        return (m_urlList.remove(url)) ? true : false;
+        initialize();
+
+        return m_repoMap.remove(uri) != null;
     }
 
     public synchronized Repository[] listRepositories()
     {
-        if (!m_initialized)
-        {
-            initialize();
-        }
+        initialize();
+
         return (Repository[]) m_repoMap.values().toArray(new Repository[m_repoMap.size()]);
     }
 
     public synchronized Resolver resolver()
     {
-        if (!m_initialized)
-        {
-            initialize();
-        }
+        initialize();
+
         List repositories = new ArrayList();
         repositories.add(m_system);
         repositories.add(m_local);
@@ -128,10 +125,8 @@
 
     public synchronized Resolver resolver(Repository[] repositories)
     {
-        if (!m_initialized)
-        {
-            initialize();
-        }
+        initialize();
+
         if (repositories == null)
         {
             return resolver();
@@ -141,10 +136,7 @@
 
     public synchronized Resource[] discoverResources(String filterExpr) throws InvalidSyntaxException
     {
-        if (!m_initialized)
-        {
-            initialize();
-        }
+        initialize();
 
         Filter filter = filterExpr != null ? filter(filterExpr) : null;
         Resource[] resources;
@@ -172,10 +164,7 @@
 
     public synchronized Resource[] discoverResources(Requirement[] requirements)
     {
-        if (!m_initialized)
-        {
-            initialize();
-        }
+        initialize();
 
         Resource[] resources = null;
         MapToDictionary dict = new MapToDictionary(null);
@@ -259,58 +248,36 @@
 
     private void initialize()
     {
+        if (m_initialized)
+        {
+            return;
+        }
         m_initialized = true;
 
-        // Initialize the repository URL list if it is currently empty.
-        if (m_urlList.size() == 0)
+        // First check the repository URL config property.
+        String urlStr = m_context.getProperty(REPOSITORY_URL_PROP);
+        if (urlStr != null)
         {
-            // First check the repository URL config property.
-            String urlStr = m_context.getProperty(REPOSITORY_URL_PROP);
-            if (urlStr != null)
+            StringTokenizer st = new StringTokenizer(urlStr);
+            if (st.countTokens() > 0)
             {
-                StringTokenizer st = new StringTokenizer(urlStr);
-                if (st.countTokens() > 0)
+                while (st.hasMoreTokens())
                 {
-                    while (st.hasMoreTokens())
+                    final String token = st.nextToken();
+                    try
                     {
-                        final String token = st.nextToken();
-                        try
-                        {
-                            m_urlList.add(new URL(token));
-                        }
-                        catch (MalformedURLException ex)
-                        {
-                            m_logger.log(
-                                Logger.LOG_WARNING,
-                                "Repository url " + token + " cannot be used. Skipped.",
-                                ex);
-                        }
+                        addRepository(token);
+                    }
+                    catch (Exception ex)
+                    {
+                        m_logger.log(
+                            Logger.LOG_WARNING,
+                            "Repository url " + token + " cannot be used. Skipped.",
+                            ex);
                     }
                 }
             }
         }
 
-        m_repoMap.clear();
-
-        for (int i = 0; i < m_urlList.size(); i++)
-        {
-            URL url = (URL) m_urlList.get(i);
-            try
-            {
-                Repository repo = new RepositoryImpl(this, url, m_logger);
-                if (repo != null)
-                {
-                    m_repoMap.put(url, repo);
-                }
-            }
-            catch (Exception ex)
-            {
-                m_logger.log(
-                    Logger.LOG_WARNING,
-                    "RepositoryAdminImpl: Exception creating repository " + url.toExternalForm()
-                        + ". Repository is skipped.",
-                    ex);
-            }
-        }
     }
 }
\ No newline at end of file
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryImpl.java
index 53d414a..db8af53 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/RepositoryImpl.java
@@ -50,7 +50,7 @@
 
     private String m_name = null;
     private long m_lastmodified = 0;
-    private URL m_url = null;
+    private String m_uri = null;
     private final Logger m_logger;
     private Resource[] m_resources = null;
     private Referral[] m_referrals = null;
@@ -63,7 +63,7 @@
     public RepositoryImpl(Resource[] resources)
     {
         m_repoAdmin = null;
-        m_url = null;
+        m_uri = null;
         m_logger = null;
         m_resources = resources;
         m_lastmodified = System.currentTimeMillis();
@@ -79,7 +79,7 @@
         throws Exception
     {
         m_repoAdmin = repoAdmin;
-        m_url = url;
+        m_uri = url.toExternalForm();
         m_logger = logger;
         m_resourceList = new ArrayList();
         try
@@ -99,14 +99,14 @@
         }
     }
 
-    public URL getURL()
+    public String getURI()
     {
-        return m_url;
+        return m_uri;
     }
 
-    protected void setURL(URL url)
+    protected void setURI(String uri)
     {
-        m_url = url;
+        m_uri = uri;
     }
 
     public Resource[] getResources()
@@ -193,22 +193,23 @@
 
         try
         {
+            URL url = new URL(m_uri);
             // Do it the manual way to have a chance to
             // set request properties as proxy auth (EW).
-            URLConnection conn = m_url.openConnection();
+            URLConnection conn = url.openConnection();
 
             // Support for http proxy authentication
             String auth = System.getProperty("http.proxyAuth");
             if ((auth != null) && (auth.length() > 0))
             {
-                if ("http".equals(m_url.getProtocol()) || "https".equals(m_url.getProtocol()))
+                if ("http".equals(url.getProtocol()) || "https".equals(url.getProtocol()))
                 {
                     String base64 = Util.base64Encode(auth);
                     conn.setRequestProperty("Proxy-Authorization", "Basic " + base64);
                 }
             }
 
-            if (m_url.getPath().endsWith(".zip"))
+            if (url.getPath().endsWith(".zip"))
             {
                 ZipInputStream zin = new ZipInputStream(conn.getInputStream());
                 ZipEntry entry = zin.getNextEntry();
@@ -240,10 +241,10 @@
                     {
                         Referral referral = m_referrals[i];
 
-                        URL url = new URL(getURL(), referral.getUrl());
+                        URL referralUrl = new URL(url, referral.getUrl());
                         hopCount = (referral.getDepth() > hopCount) ? hopCount : referral.getDepth();
 
-                        m_repoAdmin.addRepository(url, hopCount);
+                        m_repoAdmin.addRepository(referralUrl, hopCount);
                     }
                 }
             }
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResolverImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResolverImpl.java
index 1bdb1da..d4e19e3 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResolverImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResolverImpl.java
@@ -586,7 +586,7 @@
                             localResource.getBundle().stop();
                         }
                         
-                        localResource.getBundle().update(deployResources[i].getURL().openStream());
+                        localResource.getBundle().update(new URL(deployResources[i].getURI()).openStream());
 
                         // If necessary, save the updated bundle to be
                         // started later.
@@ -618,7 +618,7 @@
                     // bundle JAR URL for the bundle location, since this will
                     // limit OBR's ability to manipulate bundle versions. Instead,
                     // use a unique timestamp as the bundle location.
-                    URL url = deployResources[i].getURL();
+                    URL url = new URL(deployResources[i].getURI());
                     if (url != null)
                     {
                         Bundle bundle = m_context.installBundle(
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResourceImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResourceImpl.java
index 75f33d6..fe0d7b0 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResourceImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/ResourceImpl.java
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.bundlerepository.impl;
 
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.*;
 
 import org.apache.felix.bundlerepository.Capability;
@@ -102,7 +102,7 @@
     {
         if (!m_converted)
         {
-            convertURItoURL();
+            convertURIs();
         }
         return m_map;
     }
@@ -129,13 +129,13 @@
         return v;
     }
 
-    public URL getURL()
+    public String getURI()
     {
         if (!m_converted)
         {
-            convertURItoURL();
+            convertURIs();
         }
-        return (URL) m_map.get(Resource.URI);
+        return (String) m_map.get(Resource.URI);
     }
 
     public Requirement[] getRequirements()
@@ -196,19 +196,19 @@
         // need to defer setting the actual URL value until they
         // are used so that we will know our repository and its
         // base URL.
-        if (key.equals(LICENSE_URL))
+        if (key.equals(LICENSE_URI))
         {
             m_licenseURI = (String) value;
         }
-        else if (key.equals(DOCUMENTATION_URL))
+        else if (key.equals(DOCUMENTATION_URI))
         {
             m_docURI = (String) value;
         }
-        else if (key.equals(SOURCE_URL))
+        else if (key.equals(SOURCE_URI))
         {
             m_sourceURI = (String) value;
         }
-        else if (key.equals(JAVADOC_URL))
+        else if (key.equals(JAVADOC_URI))
         {
             m_javadocURI = (String) value;
         }
@@ -244,36 +244,36 @@
         return null;
     }
 
-    private void convertURItoURL()
+    private void convertURIs()
     {
         if (m_repo != null)
         {
             try
             {
-                URL base = m_repo.getURL();
+                URI base = m_repo.getURI() != null ? new URI(m_repo.getURI()) : null;
                 if (m_resourceURI != null)
                 {
-                    m_map.put(URI, new URL(base, m_resourceURI));
+                    m_map.put(URI, base != null ? base.resolve(m_resourceURI).toString() : m_resourceURI);
                 }
                 if (m_docURI != null)
                 {
-                    m_map.put(DOCUMENTATION_URL, new URL(base, m_docURI));
+                    m_map.put(DOCUMENTATION_URI, base != null ? base.resolve(m_docURI).toString() : m_docURI);
                 }
                 if (m_licenseURI != null)
                 {
-                    m_map.put(LICENSE_URL, new URL(base, m_licenseURI));
+                    m_map.put(LICENSE_URI, base != null ? base.resolve(m_licenseURI).toString() : m_licenseURI);
                 }
                 if (m_sourceURI != null)
                 {
-                    m_map.put(SOURCE_URL, new URL(base, m_sourceURI));
+                    m_map.put(SOURCE_URI, base != null ? base.resolve(m_sourceURI).toString() : m_sourceURI);
                 }
                 if (m_javadocURI != null)
                 {
-                    m_map.put(JAVADOC_URL, new URL(base, m_javadocURI));
+                    m_map.put(JAVADOC_URI, base != null ? base.resolve(m_javadocURI).toString() : m_javadocURI);
                 }
                 m_converted = true;
             }
-            catch (MalformedURLException ex)
+            catch (URISyntaxException ex)
             {
                 ex.printStackTrace(System.err);
             }
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/SystemRepositoryImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/SystemRepositoryImpl.java
index 05a9e5a..078bb8e 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/SystemRepositoryImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/SystemRepositoryImpl.java
@@ -18,8 +18,6 @@
  */
 package org.apache.felix.bundlerepository.impl;
 
-import java.net.URL;
-
 import org.apache.felix.bundlerepository.Resource;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
@@ -49,9 +47,9 @@
         }
     }
 
-    public URL getURL()
+    public String getURI()
     {
-        return null;
+        return SYSTEM;
     }
 
     public Resource[] getResources()
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryAdminWrapper.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryAdminWrapper.java
index 9c6379c..79655bc 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryAdminWrapper.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryAdminWrapper.java
@@ -50,7 +50,7 @@
     }
 
     public boolean removeRepository(URL repository) {
-        return admin.removeRepository(repository);
+        return admin.removeRepository(repository.toExternalForm());
     }
 
     public org.osgi.service.obr.Repository[] listRepositories() {
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryWrapper.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryWrapper.java
index cb1dff7..8b1f342 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryWrapper.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/RepositoryWrapper.java
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.bundlerepository.impl.wrapper;
 
+import java.net.MalformedURLException;
 import java.net.URL;
 
 import org.apache.felix.bundlerepository.Repository;
@@ -32,7 +33,11 @@
     }
 
     public URL getURL() {
-        return repository.getURL();
+        try {
+            return new URL(repository.getURI());
+        } catch (MalformedURLException e) {
+            throw new RuntimeException(e);
+        }
     }
 
     public org.osgi.service.obr.Resource[] getResources() {
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/ResourceWrapper.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/ResourceWrapper.java
index 0dd0184..6ef61b8 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/ResourceWrapper.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/wrapper/ResourceWrapper.java
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.bundlerepository.impl.wrapper;
 
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Map;
 
@@ -56,7 +57,11 @@
     }
 
     public URL getURL() {
-        return resource.getURL();
+        try {
+            return new URL(resource.getURI());
+        } catch (MalformedURLException e) {
+            throw new RuntimeException(e);
+        }
     }
 
     public Requirement[] getRequirements() {
diff --git a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/FilterImplTest.java b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/FilterImplTest.java
index 8fd48d2..e41fe4f 100644
--- a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/FilterImplTest.java
+++ b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/FilterImplTest.java
@@ -22,7 +22,6 @@
 import java.util.Hashtable;
 
 import junit.framework.TestCase;
-import org.apache.felix.bundlerepository.impl.FilterImpl;
 import org.osgi.framework.Version;
 
 public class FilterImplTest extends TestCase
diff --git a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryAdminTest.java b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryAdminTest.java
index 3ca41e3..2f6e4ae 100644
--- a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryAdminTest.java
+++ b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryAdminTest.java
@@ -23,10 +23,6 @@
 
 import junit.framework.TestCase;
 import org.apache.felix.bundlerepository.Resource;
-import org.apache.felix.bundlerepository.impl.FilterImpl;
-import org.apache.felix.bundlerepository.impl.Logger;
-import org.apache.felix.bundlerepository.impl.RepositoryAdminImpl;
-import org.apache.felix.bundlerepository.impl.RepositoryImpl;
 import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
@@ -82,7 +78,7 @@
         org.apache.felix.bundlerepository.Repository[] repos = repoAdmin.listRepositories();
         for (int i = 0; repos != null && i < repos.length; i++)
         {
-            repoAdmin.removeRepository(repos[i].getURL());
+            repoAdmin.removeRepository(repos[i].getURI());
         }
 
         return repoAdmin;
diff --git a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryImplTest.java b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryImplTest.java
index 6facb80..bcf1e76 100644
--- a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryImplTest.java
+++ b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/RepositoryImplTest.java
@@ -122,7 +122,7 @@
         Repository[] repos = repoAdmin.listRepositories();
         for (int i = 0; repos != null && i < repos.length; i++)
         {
-            repoAdmin.removeRepository(repos[i].getURL());
+            repoAdmin.removeRepository(repos[i].getURI());
         }
 
         return repoAdmin;
diff --git a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/ResolverImplTest.java b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/ResolverImplTest.java
index 37f4cb4..5bb7381 100644
--- a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/ResolverImplTest.java
+++ b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/ResolverImplTest.java
@@ -25,10 +25,6 @@
 
 import org.apache.felix.bundlerepository.Requirement;
 import org.apache.felix.bundlerepository.Resource;
-import org.apache.felix.bundlerepository.impl.FilterImpl;
-import org.apache.felix.bundlerepository.impl.Logger;
-import org.apache.felix.bundlerepository.impl.RepositoryAdminImpl;
-import org.apache.felix.bundlerepository.impl.RepositoryImpl;
 import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
@@ -149,7 +145,7 @@
         Repository[] repos = repoAdmin.listRepositories();
         for (int i = 0; repos != null && i < repos.length; i++)
         {
-            repoAdmin.removeRepository(repos[i].getURL());
+            repoAdmin.removeRepository(repos[i].getURI());
         }
 
         return repoAdmin;
diff --git a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/StaxParserTest.java b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/StaxParserTest.java
index 1a5139e..9223871 100644
--- a/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/StaxParserTest.java
+++ b/bundlerepository/src/test/java/org/apache/felix/bundlerepository/impl/StaxParserTest.java
@@ -24,11 +24,6 @@
 import junit.framework.TestCase;
 import org.apache.felix.bundlerepository.Resolver;
 import org.apache.felix.bundlerepository.Resource;
-import org.apache.felix.bundlerepository.impl.FilterImpl;
-import org.apache.felix.bundlerepository.impl.Logger;
-import org.apache.felix.bundlerepository.impl.RepositoryAdminImpl;
-import org.apache.felix.bundlerepository.impl.RepositoryImpl;
-import org.apache.felix.bundlerepository.impl.StaxParser;
 import org.easymock.Capture;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
@@ -153,7 +148,7 @@
         Repository[] repos = repoAdmin.listRepositories();
         for (int i = 0; repos != null && i < repos.length; i++)
         {
-            repoAdmin.removeRepository(repos[i].getURL());
+            repoAdmin.removeRepository(repos[i].getURI());
         }
 
         return repoAdmin;
