compile of jdbc driver failed - jdk 1.4.0_01

From: "Fred Tsang" <fred(at)avg(dot)nu>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: compile of jdbc driver failed - jdk 1.4.0_01
Date: 2002-09-06 09:08:59
Message-ID: HKEPIOKAFEBKBPHFFBDAKENJCCAA.fred@avg.nu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi All,

I've searched the archives on how to make the jdbc driver build under jdk
1.4.0, but all I can find is that Dave Cramer has checked in code to make it
build properly, and Marc Lavergne saying that the build.xml file can be
modified at line 34. I needed to use jdk 1.4, and I'm using cocoon. It
keeps giving me a 'cannot find suitable jdbc driver error'.

I've tried using both Postgres 7.2.2 sources, and a recent cvs grab
(yesterday), but neither of them can build properly. The cvs grab gives the
following stack trace:

compile:
[javac] Compiling 47 source files to
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/build
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/Driver.java:192:
';' expected
[javac] return ${major};
[javac] ^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/Driver.java:202:
';' expected
[javac] return ${minor};
[javac] ^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/Driver.java:192:
cannot resolve symbol
[javac] symbol : variable $
[javac] location: class org.postgresql.Driver
[javac] return ${major};
[javac] ^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/Driver.java:202:
cannot resolve symbol
[javac] symbol : variable $
[javac] location: class org.postgresql.Driver
[javac] return ${minor};
[javac] ^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:222: 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]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:379: incompatible types
[javac] found : java.sql.Statement
[javac] required: org.postgresql.jdbc2.Statement
[javac] return statement;
[javac] ^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:499: incompatible types
[javac] found : java.sql.PreparedStatement
[javac] required: org.postgresql.jdbc2.PreparedStatement
[javac] deleteStatement = ((java.sql.Connection)
connection).prepareStatement(deleteSQL.toString());
[javac]
^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:549: incompatible types
[javac] found : java.sql.PreparedStatement
[javac] required: org.postgresql.jdbc2.PreparedStatement
[javac] insertStatement = ((java.sql.Connection)
connection).prepareStatement(insertSQL.toString());
[javac]
^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:563: inconvertible types
[javac] found : org.postgresql.jdbc2.PreparedStatement
[javac] required: org.postgresql.jdbc2.AbstractJdbc2Statement
[javac] long insertedOID = ((AbstractJdbc2Statement)
insertStatement).getLastOID();
[javac] ^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:919: incompatible types
[javac] found : java.sql.PreparedStatement
[javac] required: org.postgresql.jdbc2.PreparedStatement
[javac] selectStatement = ((java.sql.Connection)
connection).prepareStatement(selectSQL.toString());
[javac]
^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2ResultSet.java:987: incompatible types
[javac] found : java.sql.PreparedStatement
[javac] required: org.postgresql.jdbc2.PreparedStatement
[javac] updateStatement = ((java.sql.Connection)
connection).prepareStatement(updateSQL.toString());
[javac]
^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJd
bc3ResultSet.java:15: 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]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJd
bc2Statement.java:51: inconvertible types
[javac] found : org.postgresql.jdbc2.AbstractJdbc2Statement
[javac] required: org.postgresql.jdbc2.Statement
[javac]
((AbstractJdbc2ResultSet)result).setStatement((Statement)this);
[javac]
^
[javac]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Resul
tSet.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]
/zips/postgres-cvs/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
:49: inconvertible types
[javac] found : org.postgresql.jdbc2.ResultSet
[javac] required: org.postgresql.jdbc2.AbstractJdbc2ResultSet
[javac] this.rawString =
((AbstractJdbc2ResultSet)rs).getFixedString(idx);
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 15 errors

BUILD FAILED
file:/zips/postgres-cvs/pgsql/src/interfaces/jdbc/build.xml:104: Compile
failed; see the compiler error output for details.

Thanks for any hints, or if someone can send me a pre-compiled jar. My
environment:

Solaris 9
JDK 1.4.0_01

Cheers,
Fred

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-09-06 09:29:46 Re: compile of jdbc driver failed - jdk 1.4.0_01
Previous Message Aleksei Valikov 2002-09-05 12:47:29 Statement.getGeneratedKeys() questions