Thread: PostgreSQL 7.3 and JDBC3

PostgreSQL 7.3 and JDBC3

From
"Maksim A. Demin"
Date:
Hello!

Tomorrow a tried to compile new postgres with JDBC3 support. I used
J2SDK 1.3.1_04, 1.4.0_01 and 1.4.1_01 and ant 1.5.1. Unfortunately, i
receive error messages from ALL jdk versions. Here my classpath:
.:/usr/local/j2sdk1.4.1_01:/usr/local/j2sdk1.4.1_01/jre/lib/ext.

This is an error messages:

/usr/local/ant/bin/ant -buildfile ./build.xml all \
   -Dmajor=7 -Dminor=3 -Dfullversion=7.3 -Ddef_pgport=5432
-Denable_debug=yes
Buildfile: ./build.xml

all:

prepare:
     [mkdir] Created dir: /usr/src/postgresql-7.3/src/interfaces/jdbc/build
     [mkdir] Created dir: /usr/src/postgresql-7.3/src/interfaces/jdbc/jars

check_versions:

driver:
      [copy] Copying 1 file to
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql
      [echo] Configured build for the JDBC3 edition driver

compile:
     [javac] Compiling 52 source files to
/usr/src/postgresql-7.3/src/interfaces/jdbc/build
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:240:
cannot resolve symbol
     [javac] symbol  : constructor Array
(org.postgresql.PGConnection,int,org.postgresql.Field,java.sql.ResultSet)
     [javac] location: class org.postgresql.jdbc2.Array
     [javac]             return (java.sql.Array) new
org.postgresql.jdbc2.Array( connection, i, fields[i - 1],
(java.sql.ResultSet) this );
     [javac]                                         ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:420:
incompatible types
     [javac] found   : java.sql.Statement
     [javac] required: org.postgresql.jdbc2.Statement
     [javac]             return statement;
     [javac]                        ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:560:
incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                     deleteStatement =
((java.sql.Connection) connection).prepareStatement(deleteSQL.toString());
     [javac]
                                   ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:619:
incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                     insertStatement =
((java.sql.Connection) connection).prepareStatement(insertSQL.toString());
     [javac]
                                   ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:639:
inconvertible types
     [javac] found   : org.postgresql.jdbc2.PreparedStatement
     [javac] required: org.postgresql.jdbc2.AbstractJdbc2Statement
     [javac]                             long insertedOID =
((AbstractJdbc2Statement) insertStatement).getLastOID();
     [javac]
                   ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:955:
incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                     selectStatement =
((java.sql.Connection) connection).prepareStatement(selectSQL.toString());
     [javac]
                                   ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:1038:
incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                             updateStatement =
((java.sql.Connection) connection).prepareStatement(updateSQL.toString());
     [javac]
                                           ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java:17:
cannot resolve symbol
     [javac] symbol  : constructor AbstractJdbc2ResultSet

(org.postgresql.PGConnection,java.sql.Statement,org.postgresql.Field[],java.util.Vector,java.lang.String,int,long,boolean)
     [javac] location: class org.postgresql.jdbc2.AbstractJdbc2ResultSet
     [javac]             super (conn, statement, fields, tuples, status,
updateCount, insertOID, binaryCursor);
     [javac]                 ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java:51:
inconvertible types
     [javac] found   : org.postgresql.jdbc2.AbstractJdbc2Statement
     [javac] required: org.postgresql.jdbc2.Statement
     [javac]
((AbstractJdbc2ResultSet)result).setStatement((Statement)this);
     [javac]
               ^
     [javac]
/usr/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java:13:
getStatement() in org.postgresql.jdbc2.AbstractJdbc2ResultSet cannot
implement getStatement() in java.sql.ResultSet; attempting to use
incompatible return type
     [javac] found   : org.postgresql.jdbc2.Statement
     [javac] required: java.sql.Statement
     [javac] public class Jdbc3ResultSet extends
org.postgresql.jdbc3.AbstractJdbc3ResultSet implements java.sql.ResultSet
     [javac]        ^
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -deprecation for details.
     [javac] 10 errors

BUILD FAILED
file:/usr/src/postgresql-7.3/src/interfaces/jdbc/build.xml:104: Compile
failed; see the compiler error output for details.

Please, help me to compile it with JDBC3.

Sincerely yours,
Maksim Demin.