Bug#679475: postgis: FTBFS with Java7 as default-java
Miguel Landaeta
miguel at miguel.cc
Fri Jun 29 01:30:25 UTC 2012
Package: postgis
Version: 1.5.3-2
Severity: normal
Tags: patch
postgis FTBFS with Java7 due to API changes.
Attached is a patch to fix this issue.
The relevant error messages are shown below and a complete build log is also
attached to this bug report.
javac -classpath "./stubbin/:/usr/share/java/postgresql.jar:./src" -d ./bin ./src/org/postgis/*.java ./src/org/postgis/*/*.java ./src/examples/*.java
./src/org/postgis/DriverWrapper.java:72: error: getParentLogger() in org.postgresql.Driver cannot implement getParentLogger() in java.sql.Driver
public class DriverWrapper extends Driver {
^
overridden method does not throw SQLException
./src/org/postgis/DriverWrapperAutoprobe.java:54: error: getParentLogger() in org.postgresql.Driver cannot implement getParentLogger() in java.sql.Driver
public class DriverWrapperAutoprobe extends DriverWrapper {
^
overridden method does not throw SQLException
./src/org/postgis/DriverWrapperLW.java:49: error: getParentLogger() in org.postgresql.Driver cannot implement getParentLogger() in java.sql.Driver
public class DriverWrapperLW extends DriverWrapper {
^
overridden method does not throw SQLException
./src/org/postgis/java2d/Java2DWrapper.java:50: error: getParentLogger() in org.postgresql.Driver cannot implement getParentLogger() in java.sql.Driver
public class Java2DWrapper extends Driver {
^
overridden method does not throw SQLException
Note: ./src/examples/TestJava2d.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
make[1]: *** [compile] Error 1
make[1]: Leaving directory `/tmp/buildd/postgis-1.5.3/java/jdbc'
make: *** [install-indep] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (800, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--
Miguel Landaeta, miguel at miguel.cc
secure email with PGP 0x6E608B637D8967E9 available at http://keyserver.pgp.com/
"Faith means not wanting to know what is true." -- Nietzsche
-------------- next part --------------
diff -Nru postgis-1.5.3/debian/changelog postgis-1.5.3/debian/changelog
--- postgis-1.5.3/debian/changelog 2011-11-21 10:37:08.000000000 -0430
+++ postgis-1.5.3/debian/changelog 2012-06-28 20:36:46.000000000 -0430
@@ -1,3 +1,10 @@
+postgis (1.5.3-2.1) UNRELEASED; urgency=low
+
+ * Non-maintainer upload.
+ * Fix FTBFS with OpenJDK 7. (Closes: #XXXXXX).
+
+ -- Miguel Landaeta <miguel at miguel.cc> Thu, 28 Jun 2012 19:31:38 -0430
+
postgis (1.5.3-2) unstable; urgency=low
* Moved pgsql2shp/shp2pgsql under conventional /usr/bin path.
diff -Nru postgis-1.5.3/debian/patches/java7-compat postgis-1.5.3/debian/patches/java7-compat
--- postgis-1.5.3/debian/patches/java7-compat 1969-12-31 20:00:00.000000000 -0400
+++ postgis-1.5.3/debian/patches/java7-compat 2012-06-28 19:30:09.000000000 -0430
@@ -0,0 +1,49 @@
+Description: Dummy compatibility patch with Java7 APIs
+Author: Miguel Landaeta <miguel at miguel.cc>
+Forwarded: no
+Last-Update: 2012-06-28
+
+--- postgis-1.5.3.orig/java/jdbc/src/org/postgis/DriverWrapper.java
++++ postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapper.java
+@@ -318,4 +318,8 @@ public class DriverWrapper extends Drive
+ pgconn.addDataType("geometry", org.postgis.PGgeometryLW.class);
+ }
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new UnsupportedOperationException("getParentLogger");
++ }
+ }
+--- postgis-1.5.3.orig/java/jdbc/src/org/postgis/DriverWrapperAutoprobe.java
++++ postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapperAutoprobe.java
+@@ -107,4 +107,8 @@ public class DriverWrapperAutoprobe exte
+ int majorVersion = Integer.parseInt(version.substring(0, idx));
+ return majorVersion >= 1;
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new UnsupportedOperationException("getParentLogger");
++ }
+ }
+--- postgis-1.5.3.orig/java/jdbc/src/org/postgis/DriverWrapperLW.java
++++ postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapperLW.java
+@@ -81,4 +81,8 @@ public class DriverWrapperLW extends Dri
+ public static String getVersion() {
+ return "PostGisWrapperLW " + REVISIONLW + ", wrapping " + Driver.getVersion();
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new UnsupportedOperationException("getParentLogger");
++ }
+ }
+--- postgis-1.5.3.orig/java/jdbc/src/org/postgis/java2d/Java2DWrapper.java
++++ postgis-1.5.3/java/jdbc/src/org/postgis/java2d/Java2DWrapper.java
+@@ -152,4 +152,8 @@ public class Java2DWrapper extends Drive
+ public static String getVersion() {
+ return "Java2DWrapper " + REVISION + ", wrapping " + Driver.getVersion();
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new UnsupportedOperationException("getParentLogger");
++ }
+ }
diff -Nru postgis-1.5.3/debian/patches/series postgis-1.5.3/debian/patches/series
--- postgis-1.5.3/debian/patches/series 2011-11-21 10:37:08.000000000 -0430
+++ postgis-1.5.3/debian/patches/series 2012-06-28 19:29:09.000000000 -0430
@@ -1,3 +1,4 @@
install
generator
html_doc_resources
+java7-compat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postgis_1.5.3-2_amd64.build.gz
Type: application/octet-stream
Size: 23816 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20120628/591a142a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20120628/591a142a/attachment-0001.pgp>
More information about the Pkg-grass-devel
mailing list