use CORSHeader instead of response filter in com.sap.sailing.server.gateway
consistently across Jersey and non-Jersey servlets provided by the bundle;
as drive-by improvement, fix the sap.ico/sap-whitelabeled.ico paths in the page
header of /index.html and provide an empty sap-whitelabeled.ico file.
after seeing the following exception:
com.mongodb.MongoGridFSException: No file found with the filename: SERIALIZATION.modelForDistanceBasedTwdDeltaStdRegressor.IncrementalSingleDimensionPolynomialRegressor.DistanceBasedTwdTransitionRegressorFrom1368.0ToMaximum.clf and revision: -1
at com.mongodb.client.gridfs.GridFSBucketImpl.getFileByName(GridFSBucketImpl.java:558)
at com.mongodb.client.gridfs.GridFSBucketImpl.openDownloadStream(GridFSBucketImpl.java:265)
at com.mongodb.client.gridfs.GridFSBucketImpl.openDownloadStream(GridFSBucketImpl.java:260)
at com.sap.sailing.windestimation.model.store.MongoDbModelStoreImpl.loadAllPersistedModels(MongoDbModelStoreImpl.java:147)
at com.sap.sailing.windestimation.model.ModelLoader.loadBestModelsForAllContexts(ModelLoader.java:132)
at com.sap.sailing.windestimation.model.AbstractModelCache.preloadAllModels(AbstractModelCache.java:66)
at com.sap.sailing.windestimation.model.AbstractModelCache.clearCache(AbstractModelCache.java:121)
at com.sap.sailing.windestimation.model.regressor.twdtransition.GaussianBasedTwdTransitionDistributionCache.clearCache(GaussianBasedTwdTransitionDistributionCache.java:92)
at com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl.reloadWindEstimationModels(WindEstimationFactoryServiceImpl.java:164)
at com.sap.sailing.windestimation.integration.WindEstimationFactoryServiceImpl.clearReplicaState(WindEstimationFactoryServiceImpl.java:150)
at com.sap.sse.replication.impl.ReplicationServiceImpl.startToReplicateFrom(ReplicationServiceImpl.java:825)
at com.sap.sse.replication.impl.Activator$1.run(Activator.java:207)
it seems that during replica initialization a DB dropping / clearing may race against the
loading of the models. The gridFs.find() method has listed a file which then doesn't exist when trying to
open it. This would break the entire replication initialization process, and the replica will not
become available. By catching and logging the exception and simply leaving the model empty,
the initial load can then take over, and all models should be fine.