Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 2.1-RC4
-
Fix Version/s: 2.1-RC5
-
Component/s: Configuration
-
Labels:None
-
Environment:Windows 7 Enterprise 64bit
-
Number of attachments :
Description
Look at GeoServerLoader.readConfiguration (~ line 614) - when reading global.xml and logging.xml, the BufferedInputStreams 'in' stay unclosed.
Problem: I run several instances of geoserver against one data directory. When the tomcat context of one geoserver instance reloads, it keeps a lock on 'global.xml' so no other instance can persist changes to global.xml - see StackTrace
StackTrace:
org.geoserver.catalog.CatalogException: Error persisting
GeoServerInfoImpl[null] to ....\data\global.xml
at
org.geoserver.config.GeoServerPersister.persist(GeoServerPersister.java:705)
at
org.geoserver.config.GeoServerPersister.handlePostGlobalChange(GeoServerPersister.java:241)
at
org.geoserver.config.impl.GeoServerImpl.fireGlobalPostModified(GeoServerImpl.java:154)
at
org.geoserver.config.impl.GeoServerImpl.save(GeoServerImpl.java:141)
at
org.geoserver.config.UpdateSequenceListener.incrementSequence(UpdateSequenceListener.java:40)
at
org.geoserver.config.UpdateSequenceListener.handlePostGlobalChange(UpdateSequenceListener.java:78)
at
org.geoserver.config.impl.GeoServerImpl.fireGlobalPostModified(GeoServerImpl.java:154)
..........
Caused by: java.io.IOException: Could not delete: .....\data\global.xml
at
org.geoserver.config.GeoServerPersister.rename(GeoServerPersister.java:665)
at
org.geoserver.config.GeoServerPersister.persist(GeoServerPersister.java:698)
When I tried a version where I closed these streams, the error didn't occur anymore.
Indeed a bug. Thanks for the report Martin! Fixed.