pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: seancompusult <sean@compusult.net>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #7577: JDBC Driver - Compiled with Java 7
Date: Mon, 15 Oct 2012 08:10:07 -0700 (PDT)
Message-ID: <1350313807264-5728220.post@n5.nabble.com> (raw)
In-Reply-To: <E1TIuWE-0003nJ-46@wrigleys.postgresql.org>
References: <E1TIuWE-0003nJ-46@wrigleys.postgresql.org>

To add to this, it's not just a question of making more sense.  Compiling the
code with Java 7 means the generated class files are version 51, which is
not acceptable to a Java 5 JRE - it wants version 49.  So the existing
pre-built jar cannot simply be dropped into a Java 5 app.

To get around this I'm trying to build from source without much more
success.  When I follow the recommendation of using a 1.5 JDK, for some
reason ant still craps out with an UnsupportedClassVersionError.  I also
tried to hack the build.xml to force compilation with source="1.5" and
target="1.5", but then the compilation fails like this:

compile:
    [javac] /opt/sean/software/postgresql-jdbc-9.0-802.src/build.xml:120:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 176 source files to
/opt/sean/software/postgresql-jdbc-9.0-802.src/build
    [javac] warning: [options] bootstrap class path not set in conjunction
with -source 1.5
    [javac]
/opt/sean/software/postgresql-jdbc-9.0-802.src/org/postgresql/Driver.java:47:
error: org.postgresql.Driver is not abstract and does not override abstract
method getParentLogger() in java.sql.Driver
    [javac] public class Driver implements java.sql.Driver
    [javac]        ^
    [javac]
/opt/sean/software/postgresql-jdbc-9.0-802.src/org/postgresql/ds/PGConnectionPoolDataSource.java:39:
error: PGConnectionPoolDataSource is not abstract and does not override
abstract method getParentLogger() in CommonDataSource
    [javac] public class PGConnectionPoolDataSource extends BaseDataSource
implements Serializable, ConnectionPoolDataSource
    [javac]        ^
    [javac]
/opt/sean/software/postgresql-jdbc-9.0-802.src/org/postgresql/ds/PGPooledConnection.java:26:
error: PGPooledConnection is not abstract and does not override abstract
method removeStatementEventListener(StatementEventListener) in
PooledConnection

etc.

Does anyone have a solution for people like me who must use Java 5?

Thanks,
Sean



--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-7577-JDBC-Driver-Compiled-with-Java-7-tp5726254p5728220....
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.




view thread (5+ messages)  latest in thread

Message-ID: <1350313807264-5728220.post@n5.nabble.com>
Permalink:  ../1350313807264-5728220.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1350313807264-5728220.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: sean@compusult.net
  Subject: Re: BUG #7577: JDBC Driver - Compiled with Java 7
  In-Reply-To: <1350313807264-5728220.post@n5.nabble.com>
  References: <E1TIuWE-0003nJ-46@wrigleys.postgresql.org> <1350313807264-5728220.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox