Modify ↓
#7109 closed defect (fixed)
WMS-cache does not cache between sessions/INDEX_FILENAME = "index.xml" does not get created
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | WMS cache index removeNonReferencedFiles | Cc: |
Description
INDEX_FILENAME = "index.xml"
does not get created despite the message: Index for wms-cache doesn't exist, new file will be created
.
Because of that
removeNonReferencedFiles()
always removes all files thus no cache between sessions, or removing the WMS-layer and adding it again. :-(
Version 4629
Attachments (0)
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Correct:
saveIndex()
causes an exception in WmsCache.java:302
:
Failed to save wms-cache file javax.xml.bind.JAXBException: "org.openstreetmap.josm.data.imagery.types" doesnt contain ObjectFactory.class or jaxb.index at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at org.openstreetmap.josm.data.imagery.WmsCache.saveIndex(WmsCache.java:302) at org.openstreetmap.josm.gui.layer.WMSLayer.destroy(WMSLayer.java:209) at org.openstreetmap.josm.gui.MapView.removeLayer(MapView.java:368) at org.openstreetmap.josm.Main.removeLayer(Main.java:217) at org.openstreetmap.josm.gui.dialogs.LayerListDialog$DeleteLayerAction.actionPerformed(LayerListDialog.java:401) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Note:
See TracTickets
for help on using tickets.
The message means that index will be created after josm is closed or wms layer removed. It's correct that removeNonReferenecdFiles() removes all files because josm can't reconstruct index just from filenames.
Real problem is in saving index. I don't know what goes wrong but you seem to have some programming knowledge so it would be great if you could import josm to eclipse, put breakpoint in saveIndex() method and check whether it's called and what happens there.