diff --git a/annis-service/src/main/java/annis/dao/SpringAnnisDao.java b/annis-service/src/main/java/annis/dao/SpringAnnisDao.java
index <HASH>..<HASH> 100644
--- a/annis-service/src/main/java/annis/dao/SpringAnnisDao.java
+++ b/annis-service/src/main/java/annis/dao/SpringAnnisDao.java
@@ -336,6 +336,17 @@ public class SpringAnnisDao extends SimpleJdbcDaoSupport implements AnnisDao,
 
 
     File dir = getRealDataDir();
+    if (!dir.exists())
+    {
+      if (dir.mkdirs())
+      {
+        log.info("Created directory " + dir);
+      }
+      else
+      {
+        log.error("Directory " + dir + " doesn't exist and cannot be created");
+      }
+    }
 
     if (fileName == null)
     {
Before writing corpus properties file, ensure that the data directory exists.