Re: BUG #7577: JDBC Driver - Compiled with Java 7

From: seancompusult <sean(at)compusult(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7577: JDBC Driver - Compiled with Java 7
Date: 2012-10-15 15:10:07
Message-ID: 1350313807264-5728220.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-10-15 15:44:00 Re: BUG #7598: Loss of view performance after dump/restore of the view definition
Previous Message Deven Thaker 2012-10-15 15:02:45 Re: BUG #7592: Installation of PostGresql at c:\Progam files folder does not create right permission on data folder