When GeoServer SQL Server stores won’t load on a new server

We’ve been migrating a large GeoServer instance onto a new Windows 2019 server. The old GeoServer instance was running version 2.7, the new one version 2.15.1. Nearly everything “just worked” after copying the old data directory into the new location, however several SQL Server stores didn’t appear.

This kind of thing was seen for each store in the GeoServer logs:

2020-06-01 13:26:43,677 WARN [org.geoserver] - Failed to load data store 'MyStoreName'
---- Debugging information ----
cause-exception     : org.jasypt.exceptions.EncryptionOperationNotPossibleException
cause-message       : null
class               : org.geoserver.catalog.impl.DataStoreInfoImpl
required-type       : org.geoserver.catalog.impl.DataStoreInfoImpl
converter-type      : org.geoserver.config.util.XStreamPersister$StoreInfoConverter
line number         : 31
version             : 2.15.1

First we verified that we could create a new SQL Server store using the GeoServer administrative interfaces – this proved that the plugin for SQL Server and the various driver files were installed and working correctly.

So why were the old stores not working? The store database connection for each store is defined in a file like this:


and in this file we find a line like this:

<entry key="passwd">crypt1:ywSBY9D+HjlxxL/SuRwBPVmT8P98f47M</entry>

The solution is to delete that line in the definition file for each store, then restart GeoServer. The stores then appear in the GeoServer admin pages, and you can edit each one to re-enter the password, after which any layers should be operational.


Find out more