diff --git a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
index d532af7..90c86f3 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
@@ -965,9 +965,9 @@
                 if (id != getBundleId())
                 {
                     String sym = bundles[i].getSymbolicName();
-                    Version ver = Version.parseVersion((String) ((BundleImpl) bundles[i])
-                        .getCurrentModule().getHeaders().get(Constants.BUNDLE_VERSION));
-                    if (symName.equals(sym) && bundleVersion.equals(ver))
+                    Version ver = ((ModuleImpl)
+                        ((BundleImpl) bundles[i]).getCurrentModule()).getVersion();
+                    if ((symName != null) && (sym != null) && symName.equals(sym) && bundleVersion.equals(ver))
                     {
                         throw new BundleException("Bundle symbolic name and version are not unique: " + sym + ':' + ver);
                     }
diff --git a/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
index a22a0f4..9b789a1 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/manifestparser/ManifestParser.java
@@ -63,14 +63,34 @@
         Map dupeMap = new HashMap();
 
         //
+        // Parse bundle version.
+        //
+
+        m_bundleVersion = Version.emptyVersion;
+        if (headerMap.get(Constants.BUNDLE_VERSION) != null)
+        {
+            try
+            {
+                m_bundleVersion = Version.parseVersion((String) headerMap.get(Constants.BUNDLE_VERSION));
+            }
+            catch (RuntimeException ex)
+            {
+                // R4 bundle versions must parse, R3 bundle version may not.
+                if (manifestVersion.equals("2"))
+                {
+                    throw ex;
+                }
+                m_bundleVersion = Version.emptyVersion;
+            }
+        }
+
+        //
         // Parse bundle symbolic name.
         //
 
         ICapability moduleCap = parseBundleSymbolicName(m_headerMap);
         if (moduleCap != null)
         {
-            m_bundleVersion = (Version)
-                moduleCap.getProperties().get(Constants.BUNDLE_VERSION_ATTRIBUTE);
             m_bundleSymbolicName = (String)
                 moduleCap.getProperties().get(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE);
 
@@ -811,7 +831,7 @@
             }
 
             // Get bundle version.
-            Version bundleVersion = null;
+            Version bundleVersion = Version.emptyVersion;
             if (headerMap.get(Constants.BUNDLE_VERSION) != null)
             {
                 try
