Re: compile of jdbc driver failed - jdk 1.4.0_01 - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: compile of jdbc driver failed - jdk 1.4.0_01
Date
Msg-id 3D793A9C.8020504@xythos.com
Whole thread Raw
In response to Re: compile of jdbc driver failed - jdk 1.4.0_01  ("Fred Tsang" <fred@avg.nu>)
List pgsql-jdbc
Fred,

Can you send the entire ant output?

To your original problem.  The 7.2 code doesn't support datasources.
    Thus the errors you were seeing.  The 7.3 code does, but I think it
only supports them in the jdbc2 build (and then only when the javax.sql
package is available).  The person who contributed the datasource logic
only coded it into the jdbc2 build.  He also seems to have disappeared
before submitting any documentation updates, so I really don't know how
it works.  I think your best bet may be to build the 7.3 code under a
1.3 jdk with the optional javax.sql package installed from J2EE.  This
should build the driver with datasource support included.

thanks,
--Barry


Dave Cramer wrote:

   >Ok,
   >
   >It looks like it isn't getting the configuration right ??? It should be
   >building jdbc3 classes
   >
   >Barry has been cc'd and he is the one who enabled the jdk1.4 build.
   >
   >Dave
   >On Fri, 2002-09-06 at 09:17, Fred Tsang wrote:
   >
   >
   >>Hi Dave,
   >>
   >>When I use the jdk 1.3 compiled driver, I get the following error from
   >>cocoon:
   >>
   >>org.apache.cocoon.ProcessingException: Exception in
   >>ServerPagesGenerator.generate(): java.lang.RuntimeException: Could
not get
   >>the datasource java.sql.SQLException: No suitable driver
   >>
   >>I'm using Tomcat 4.0.4 and Cocoon 2.0.3 compiled from source using
jdk1.4.
   >>I guess I just think compiling the jdbc driver using jdk 1.4 will
make it
   >>work, but I'm not sure.
   >>
   >>Sorry, I must've forgotten to run make the first time.  I still can't
   >>compile though, as I get 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/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] 11 errors
   >>
   >>Do you know if I can download a jdk 1.4 built package from somewhere?
   >>Thanks very much!
   >>
   >>Fred
   >>
   >>
   >>---------------------------(end of
broadcast)---------------------------
   >>TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org
   >>
   >>
   >>
   >>
   >
   >
   >
   >
   >
   >






pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: problem with new autocommit config parameter and jdbc
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] problem with new autocommit config parameter and jdbc