Added delete-config & tests; updated lib & java versions; fixed bugs.

Change-Id: I7a2a7d316b28e856062b678a70d9c0d251ed1ee8
diff --git a/core/Changes b/core/Changes
index c6ff1ba..d1d629e 100644
--- a/core/Changes
+++ b/core/Changes
@@ -1,7 +1,9 @@
-0.59.10 2018-01-25 
+0.59.10 2018-02-01 
 	- updated hibernate and reflection versions (margaretha)
 	- added Changes file (margaretha)
 	- merged BeanConfigBaseTest to BeanConfigTest in /full (margaretha)
+	- added status code for already deleted entry (margaretha)
+	- updated library versions and java environment (margaretha)	
 0.59.9 	2017-11-08
 	- fixed missing exception in JsonUtils (margaretha)
 	- fixed and restructured KustvaktResponseHandler (margaretha)
diff --git a/core/pom.xml b/core/pom.xml
index cb42b84..d110402 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -6,10 +6,11 @@
 	<version>0.59.10</version>
 
 	<properties>
-		<java.version>1.7</java.version>
+		<java.version>1.8</java.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<spring-framework.version>4.3.11.RELEASE</spring-framework.version>
+		<spring-framework.version>5.0.3.RELEASE</spring-framework.version>
 		<jersey.version>1.19.4</jersey.version>
+		<jetty.version>8.2.0.v20160908</jetty.version>
 		<hibernate.version>5.1.11.Final</hibernate.version>
 	</properties>
 	<build>
@@ -53,13 +54,13 @@
 			<plugin>
 				<groupId>com.googlecode.maven-java-formatter-plugin</groupId>
 				<artifactId>maven-java-formatter-plugin</artifactId>
-				<version>0.4</version>
+				<version>${project.version}</version>
 				<configuration>
 					<configFile>${project.basedir}/Format.xml</configFile>
 					<overrideConfigCompilerVersion>true</overrideConfigCompilerVersion>
-					<compilerSource>1.7</compilerSource>
-					<compilerCompliance>1.7</compilerCompliance>
-					<compilerTargetPlatform>1.7</compilerTargetPlatform>
+					<compilerSource>${java.version}</compilerSource>
+					<compilerCompliance>${java.version}</compilerCompliance>
+					<compilerTargetPlatform>${java.version}</compilerTargetPlatform>
 				</configuration>
 				<!-- <executions> <execution> <goals> <goal>format</goal> </goals> </execution> 
 					</executions> -->
@@ -67,7 +68,7 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.3</version>
+				<version>3.7.0</version>
 				<configuration>
 					<compilerVersion>${java.version}</compilerVersion>
 					<source>${java.version}</source>
@@ -77,10 +78,10 @@
 
 			<!-- build tests jar, so extensions can use fastjerseytest class to build 
 				rest tests -->
-			<plugin>
+			<!-- <plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-jar-plugin</artifactId>
-				<version>2.1</version>
+				<version>3.0.2</version>
 				<executions>
 					<execution>
 						<phase>package</phase>
@@ -89,7 +90,7 @@
 						</goals>
 					</execution>
 				</executions>
-			</plugin>
+			</plugin> -->
 			<!-- Generate source jar -->
 		    <plugin>
 		      <groupId>org.apache.maven.plugins</groupId>
@@ -192,7 +193,7 @@
 		<dependency>
 			<groupId>org.slf4j</groupId>
 			<artifactId>slf4j-log4j12</artifactId>
-			<version>1.7.5</version>
+			<version>1.7.25</version>
 		</dependency>
 		<!-- <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> 
 			<version>1.2.17</version> </dependency> <dependency> <groupId>log4j</groupId> 
@@ -205,12 +206,12 @@
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>
-			<version>1.16.6</version>
+			<version>1.16.20</version>
 		</dependency>
 		<dependency>
 			<groupId>joda-time</groupId>
 			<artifactId>joda-time</artifactId>
-			<version>2.2</version>
+			<version>2.9.9</version>
 		</dependency>
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
@@ -227,7 +228,7 @@
 		<dependency>
 			<groupId>org.xerial</groupId>
 			<artifactId>sqlite-jdbc</artifactId>
-			<version>3.20.1</version>
+			<version>3.21.0</version>
 		</dependency>
 
 		
@@ -235,21 +236,22 @@
 		<dependency>
 			<groupId>org.apache.commons</groupId>
 			<artifactId>commons-dbcp2</artifactId>
-			<version>2.1.1</version>
+			<version>2.2.0</version>
 		</dependency>
 
 		<dependency>
 			<groupId>commons-validator</groupId>
 			<artifactId>commons-validator</artifactId>
-			<version>1.4.0</version>
+			<version>1.6</version>
 		</dependency>
 
 		<dependency>
 			<groupId>org.mindrot</groupId>
 			<artifactId>jbcrypt</artifactId>
-			<version>0.3m</version>
+			<version>0.4</version>
 		</dependency>
-
+		
+		<!-- EM: nimbus version is very old -->
 		<dependency>
 			<groupId>com.nimbusds</groupId>
 			<artifactId>nimbus-jose-jwt</artifactId>
@@ -354,17 +356,17 @@
 		<dependency>
 			<groupId>commons-collections</groupId>
 			<artifactId>commons-collections</artifactId>
-			<version>3.2.1</version>
+			<version>3.2.2</version>
 		</dependency>
 		<dependency>
 			<groupId>org.eclipse.jetty</groupId>
 			<artifactId>jetty-server</artifactId>
-			<version>8.1.8.v20121106</version>
+			<version>${jetty.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>org.eclipse.jetty</groupId>
 			<artifactId>jetty-servlet</artifactId>
-			<version>8.1.8.v20121106</version>
+			<version>${jetty.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>asm</groupId>
@@ -414,12 +416,12 @@
 		<dependency>
 			<groupId>org.apache.httpcomponents</groupId>
 			<artifactId>httpclient</artifactId>
-			<version>4.3.3</version>
+			<version>4.5.4</version>
 		</dependency>
 		<dependency>
 			<groupId>commons-io</groupId>
 			<artifactId>commons-io</artifactId>
-			<version>2.4</version>
+			<version>2.6</version>
 		</dependency>
 
 		<dependency>
diff --git a/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java b/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
index 1ca8904..ac73909 100644
--- a/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
+++ b/core/src/main/java/de/ids_mannheim/korap/exceptions/KustvaktException.java
@@ -30,8 +30,10 @@
     }
     
     public KustvaktException (int status, String ... args) {
+        super(args[0]);
         this.statusCode = status;
-        this.entity = Arrays.asList(args).toString();
+        String[] subarray = Arrays.copyOfRange(args, 1, args.length);
+        this.entity = Arrays.asList(subarray).toString();
     }
 
     public KustvaktException (int status, String notification, boolean isNotification) {
diff --git a/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java b/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
index ae96327..5b57438 100644
--- a/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
+++ b/core/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
@@ -15,7 +15,7 @@
      */
     public static final int DEFAULT_ERROR = 100;
     public static final int NO_RESULT_FOUND = 101;
-    public static final int ENTRY_EXISTS = 102;
+
     public static final int UNSUPPORTED_OPERATION = 103;
     public static final int ILLEGAL_ARGUMENT = 104;
     public static final int MISSING_ARGUMENT = 105;
@@ -79,7 +79,9 @@
     public static final int DB_INSERT_SUCCESSFUL = 505;
     public static final int DB_DELETE_SUCCESSFUL = 506;
     public static final int DB_UPDATE_SUCCESSFUL = 507;
-
+    
+    public static final int DB_ENTRY_EXISTS = 508;
+    public static final int DB_ENTRY_DELETED = 509;
 
 //    public static final int ARGUMENT_VALIDATION_FAILURE = 700;
     // public static final int ARGUMENT_VALIDATION_FAILURE = 701;