Index: WmsCache.java
===================================================================
--- WmsCache.java	(revision 4079)
+++ WmsCache.java	(working copy)
@@ -293,8 +293,8 @@
                     WmsCacheType.class.getPackage().getName(),
                     WmsCacheType.class.getClassLoader());
             Marshaller marshaller = context.createMarshaller();
-            marshaller.marshal(index, new File(cacheDir, INDEX_FILENAME));
-        } catch (JAXBException e) {
+            marshaller.marshal(index, new FileOutputStream(new File(cacheDir, INDEX_FILENAME)));
+        } catch (Exception e) {
             System.err.println("Failed to save wms-cache file");
             e.printStackTrace();
         }
