[PATCH 1 of 2] Upgrade to new PostgreSQL JDBC-driver

Wald Commits scm-commit at wald.intevation.org
Tue Mar 14 17:37:40 CET 2017


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1489505234 -3600
# Node ID dbdb7c9bd51b43ea4c3e4f0d0b4264c6057a528a
# Parent  d10f0645b12545e577bd8f80d2296e879ee95590
Upgrade to new PostgreSQL JDBC-driver.

This needs more explicit type mapping but fixes the sometimes occuring
error because of unimplemented Jdbc4Connection.isValid().

diff -r d10f0645b125 -r dbdb7c9bd51b backend/pom.xml
--- a/backend/pom.xml	Mon Feb 22 17:26:36 2016 +0100
+++ b/backend/pom.xml	Tue Mar 14 16:27:14 2017 +0100
@@ -132,9 +132,9 @@
     </dependency>
     <dependency>
       <!-- overwrite dependency of postgis-jdbc -->
-      <groupId>postgresql</groupId>
+      <groupId>org.postgresql</groupId>
       <artifactId>postgresql</artifactId>
-      <version>9.1-901-1.jdbc4</version>
+      <version>42.0.0.jre7</version>
       <scope>runtime</scope>
     </dependency>
     <dependency>
@@ -142,6 +142,12 @@
       <artifactId>postgis-jdbc</artifactId>
       <version>1.3.3</version>
       <scope>runtime</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>postgresql</groupId>
+          <artifactId>postgresql</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.hibernatespatial</groupId>
diff -r d10f0645b125 -r dbdb7c9bd51b backend/src/main/java/org/dive4elements/river/model/River.java
--- a/backend/src/main/java/org/dive4elements/river/model/River.java	Mon Feb 22 17:26:36 2016 +0100
+++ b/backend/src/main/java/org/dive4elements/river/model/River.java	Tue Mar 14 16:27:14 2017 +0100
@@ -31,6 +31,7 @@
 
 import org.hibernate.Query;
 import org.hibernate.Session;
+import org.hibernate.annotations.Type;
 
 import org.apache.log4j.Logger;
 
@@ -109,6 +110,7 @@
         this.name = name;
     }
 
+    @Type(type="numeric_boolean")
     @Column(name = "km_up")
     public boolean getKmUp() {
         return kmUp;


More information about the Dive4Elements-commits mailing list