diff --git a/cadastrapp/pom.xml b/cadastrapp/pom.xml
index 5e137da2..30d06f13 100644
--- a/cadastrapp/pom.xml
+++ b/cadastrapp/pom.xml
@@ -251,6 +251,11 @@
gt-wfs-ng
${geotools.version}
+
+ org.geotools
+ gt-app-schema
+ ${geotools.version}
+
org.quartz-scheduler
quartz
diff --git a/cadastrapp/src/main/java/org/georchestra/cadastrapp/context/CadastrappContextListener.java b/cadastrapp/src/main/java/org/georchestra/cadastrapp/context/CadastrappContextListener.java
index 7fe22516..4f93b7ff 100644
--- a/cadastrapp/src/main/java/org/georchestra/cadastrapp/context/CadastrappContextListener.java
+++ b/cadastrapp/src/main/java/org/georchestra/cadastrapp/context/CadastrappContextListener.java
@@ -9,6 +9,7 @@
import org.apache.commons.io.FileUtils;
import org.georchestra.cadastrapp.configuration.CadastrappPlaceHolder;
+import org.geotools.xml.resolver.SchemaCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ConfigurableApplicationContext;
@@ -43,6 +44,18 @@ public void contextInitialized(ServletContextEvent sce) {
if(writeTest.createNewFile()){
logger.debug("Init config - folder " + tempFolder + " exist and is writable");
writeTest.delete();
+
+ // update the schemaCache key and create folder if not already exist
+ if(System.getProperty(SchemaCache.PROVIDED_CACHE_LOCATION_KEY, null) == null){
+ logger.debug("Init SchemaCache property and folder");
+ File schemaCacheFolder = new File(tempFolder+File.separator, "app-schema-cache");
+ // remove previous folder
+ schemaCacheFolder.delete();
+ // create folder
+ schemaCacheFolder.mkdirs();
+ System.setProperty(SchemaCache.PROVIDED_CACHE_LOCATION_KEY, schemaCacheFolder.getAbsolutePath());
+ }
+ // else directory should have been created by admin when adding -Dschema.cache.dir=
}else{
logger.error("Init config - folder " + tempFolder + " exist but is not writable");
// Throw an exception to stop deploiement in init phase