Thread: postgres CVS Against j2sdk1.4 Failure
As per David Cramer's direction in http://archives.postgresql.org/pgsql-jdbc/2002-04/msg00173.php I retrieved postgres from CVS so as to compile the jdbc driver under java 1.4. The CVS repository from which I retrieved it was dictated by the statement "The source is included with PostgreSQL, and because it is integrated with PostgreSQL is not available on it's own. Check the main developer site for details of obtaining the PostgreSQL source code from CVS." at http://jdbc.postgresql.org/download.html (ant came out of jwsdp-1_0-ea2). However: $ echo $PATH /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/java/j2sdk1.4. 0/bin:/usr/local/jwsdp-1_0-ea2/bin:/home/postgres/bin $ cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot login $ cvs -z3 -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -P pgsql $ cd pgsql/ $ ./configure --with-CXX --with-openssl --with-java --with-python --with-perl --enable-debug --with-tcl --enable-multibyte --enable-locale --enable-depen d --enable-cassert --enable-syslog $ make Produces the following errors: /usr/local/jwsdp-1_0-ea2/bin/ant -buildfile ./build.xml all \ -Dmajor=7 -Dminor=3 -Dfullversion=7.3devel -Ddef_pgport=5432 -Denable_debu g=yes Buildfile: ./build.xml all: prepare: [mkdir] Created dir: /home/postgres/pgsql/src/interfaces/jdbc/build [mkdir] Created dir: /home/postgres/pgsql/src/interfaces/jdbc/jars check_versions: driver: [copy] Copying 1 file to /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql [echo] Configured build for the JDBC2 Enterprise edition driver compile: [javac] Compiling 48 source files to /home/postgres/pgsql/src/interfaces/jdbc/build [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java :60: org.postgresql.jdbc2.ResultSet should be declared abstract; it does not define getURL(int) in org.postgresql.jdbc2.ResultSet [javac] public class ResultSet extends org.postgresql.ResultSet implements java.sql.ResultSet [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java :25: org.postgresql.jdbc2.Statement should be declared abstract; it does not define getMoreResults(int) in org.postgresql.jdbc2.Statement [javac] public class Statement extends org.postgresql.Statement implements java.sql.Statement [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.jav a:37: org.postgresql.jdbc2.Connection should be declared abstract; it does not define setHoldability(int) in org.postgresql.jdbc2.Connection [javac] public class Connection extends org.postgresql.Connection implements java.sql.Connection [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaDa ta.java:40: org.postgresql.jdbc2.DatabaseMetaData should be declared abstract; it does not define supportsSavepoints() in org.postgresql.jdbc2.DatabaseMetaData [javac] public class DatabaseMetaData implements java.sql.DatabaseMetaData [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatem ent.java:32: org.postgresql.jdbc2.PreparedStatement should be declared abstract; it does not define setURL(int,java.net.URL) in org.postgresql.jdbc2.PreparedStatement [javac] public class PreparedStatement extends Statement implements java.sql.PreparedStatement [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/CallableStatem ent.java:42: org.postgresql.jdbc2.CallableStatement should be declared abstract; it does not define registerOutParameter(java.lang.String,int) in org.postgresql.jdbc2.CallableStatement [javac] public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement implements java.sql.CallableStatement [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/PGblob.j ava:26: org.postgresql.largeobject.PGblob should be declared abstract; it does not define setBytes(long,byte[]) in org.postgresql.largeobject.PGblob [javac] public class PGblob implements java.sql.Blob [javac] ^ [javac] /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/PGclob.j ava:26: org.postgresql.largeobject.PGclob should be declared abstract; it does not define setString(long,java.lang.String) in org.postgresql.largeobject.PGclob [javac] public class PGclob implements java.sql.Clob [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 8 errors BUILD FAILED
J2SDK 1.4 uses the JDBC 3.0 specification, which among other things adds some methods to ResultSet which haven't been implementedin the code... have you got a 1.3 JVM about that you can compile it with? Once compiled, you can still use itunder J2SDK 1.4 (of course none of the unimplemented methods will be available). I'm not sure what the state of play is with implementing the JDBC 3.0 spec though (I think there's a few quick wins we mightbe able to do, like the method that retrieves the sequence number). What are the developer's thoughts on this, willit follow a similar path and create an org.postgresql.jdbc3 package? Cheers, Joe > As per David Cramer's direction in > http://archives.postgresql.org/pgsql-jdbc/2002-04/msg00173.php I retrieved > postgres from CVS so as to compile the jdbc driver under java > 1.4. The CVS > repository from which I retrieved it was dictated by the statement "The > source is included with PostgreSQL, and because it is integrated with > PostgreSQL is not available on it's own. Check the main developer site for > details of obtaining the PostgreSQL source code from CVS." at > http://jdbc.postgresql.org/download.html (ant came out of jwsdp-1_0-ea2). > > However: > [snip] > $ make > > Produces the following errors: [snip] > :60: org.postgresql.jdbc2.ResultSet should be declared abstract; > it does not > define getURL(int) in org.postgresql.jdbc2.ResultSet > [javac] public class ResultSet extends org.postgresql.ResultSet > implements java.sql.ResultSet > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Stat > ement.java > :25: org.postgresql.jdbc2.Statement should be declared abstract; > it does not > define getMoreResults(int) in org.postgresql.jdbc2.Statement > [javac] public class Statement extends org.postgresql.Statement > implements java.sql.Statement > [javac] ^
Others may have other thoughts, but I don't see any other way besides a jdbc3 package. There is at least one patch around which has stub implementations for the jdbc3 methods Dave On Mon, 2002-04-29 at 20:32, Joe Shevland wrote: > J2SDK 1.4 uses the JDBC 3.0 specification, which among other things adds some methods to ResultSet which haven't been implementedin the code... have you got a 1.3 JVM about that you can compile it with? Once compiled, you can still use itunder J2SDK 1.4 (of course none of the unimplemented methods will be available). > > I'm not sure what the state of play is with implementing the JDBC 3.0 spec though (I think there's a few quick wins wemight be able to do, like the method that retrieves the sequence number). What are the developer's thoughts on this, willit follow a similar path and create an org.postgresql.jdbc3 package? > > Cheers, > Joe > > > As per David Cramer's direction in > > http://archives.postgresql.org/pgsql-jdbc/2002-04/msg00173.php I retrieved > > postgres from CVS so as to compile the jdbc driver under java > > 1.4. The CVS > > repository from which I retrieved it was dictated by the statement "The > > source is included with PostgreSQL, and because it is integrated with > > PostgreSQL is not available on it's own. Check the main developer site for > > details of obtaining the PostgreSQL source code from CVS." at > > http://jdbc.postgresql.org/download.html (ant came out of jwsdp-1_0-ea2). > > > > However: > > > [snip] > > $ make > > > > Produces the following errors: > [snip] > >:60: org.postgresql.jdbc2.ResultSet should be declared abstract; > > it does not > > define getURL(int) in org.postgresql.jdbc2.ResultSet > > [javac] public class ResultSet extends org.postgresql.ResultSet > > implements java.sql.ResultSet > > [javac] ^ > > [javac] > > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Stat > > ement.java > >:25: org.postgresql.jdbc2.Statement should be declared abstract; > > it does not > > define getMoreResults(int) in org.postgresql.jdbc2.Statement > > [javac] public class Statement extends org.postgresql.Statement > > implements java.sql.Statement > > [javac] ^ > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > >
I'm not exactly sure what I said in the link below, but the driver will not build under jdk1.4. You can use a binary jar compiled under jdk 1.3 in a 1.4 environment however. Dave On Mon, 2002-04-29 at 19:12, Jim Bowery wrote: > As per David Cramer's direction in > http://archives.postgresql.org/pgsql-jdbc/2002-04/msg00173.php I retrieved > postgres from CVS so as to compile the jdbc driver under java 1.4. The CVS > repository from which I retrieved it was dictated by the statement "The > source is included with PostgreSQL, and because it is integrated with > PostgreSQL is not available on it's own. Check the main developer site for > details of obtaining the PostgreSQL source code from CVS." at > http://jdbc.postgresql.org/download.html (ant came out of jwsdp-1_0-ea2). > > However: > > $ echo $PATH > /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/java/j2sdk1.4. > 0/bin:/usr/local/jwsdp-1_0-ea2/bin:/home/postgres/bin > $ cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot login > $ cvs -z3 -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -P > pgsql > $ cd pgsql/ > $ > ./configure --with-CXX --with-openssl --with-java --with-python --with-perl > --enable-debug --with-tcl --enable-multibyte --enable-locale --enable-depen > d --enable-cassert --enable-syslog > $ make > > Produces the following errors: > > /usr/local/jwsdp-1_0-ea2/bin/ant -buildfile ./build.xml all \ > -Dmajor=7 -Dminor=3 -Dfullversion=7.3devel -Ddef_pgport=5432 -Denable_debu > g=yes > Buildfile: ./build.xml > > all: > > prepare: > [mkdir] Created dir: /home/postgres/pgsql/src/interfaces/jdbc/build > [mkdir] Created dir: /home/postgres/pgsql/src/interfaces/jdbc/jars > > check_versions: > > driver: > [copy] Copying 1 file to > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql > [echo] Configured build for the JDBC2 Enterprise edition driver > > compile: > [javac] Compiling 48 source files to > /home/postgres/pgsql/src/interfaces/jdbc/build > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java >:60: org.postgresql.jdbc2.ResultSet should be declared abstract; it does not > define getURL(int) in org.postgresql.jdbc2.ResultSet > [javac] public class ResultSet extends org.postgresql.ResultSet > implements java.sql.ResultSet > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java >:25: org.postgresql.jdbc2.Statement should be declared abstract; it does not > define getMoreResults(int) in org.postgresql.jdbc2.Statement > [javac] public class Statement extends org.postgresql.Statement > implements java.sql.Statement > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.jav > a:37: org.postgresql.jdbc2.Connection should be declared abstract; it does > not define setHoldability(int) in org.postgresql.jdbc2.Connection > [javac] public class Connection extends org.postgresql.Connection > implements java.sql.Connection > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaDa > ta.java:40: org.postgresql.jdbc2.DatabaseMetaData should be declared > abstract; it does not define supportsSavepoints() in > org.postgresql.jdbc2.DatabaseMetaData > [javac] public class DatabaseMetaData implements > java.sql.DatabaseMetaData > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatem > ent.java:32: org.postgresql.jdbc2.PreparedStatement should be declared > abstract; it does not define setURL(int,java.net.URL) in > org.postgresql.jdbc2.PreparedStatement > [javac] public class PreparedStatement extends Statement implements > java.sql.PreparedStatement > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/CallableStatem > ent.java:42: org.postgresql.jdbc2.CallableStatement should be declared > abstract; it does not define registerOutParameter(java.lang.String,int) in > org.postgresql.jdbc2.CallableStatement > [javac] public class CallableStatement extends > org.postgresql.jdbc2.PreparedStatement implements java.sql.CallableStatement > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/PGblob.j > ava:26: org.postgresql.largeobject.PGblob should be declared abstract; it > does not define setBytes(long,byte[]) in org.postgresql.largeobject.PGblob > [javac] public class PGblob implements java.sql.Blob > [javac] ^ > [javac] > /home/postgres/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/PGclob.j > ava:26: org.postgresql.largeobject.PGclob should be declared abstract; it > does not define setString(long,java.lang.String) in > org.postgresql.largeobject.PGclob > [javac] public class PGclob implements java.sql.Clob > [javac] ^ > [javac] Note: Some input files use or override a deprecated API. > [javac] Note: Recompile with -deprecation for details. > [javac] 8 errors > > BUILD FAILED > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > >
Normally when doing a postgres build, the commands: $ ./configure --with-java $ make $ make check $ make install Do it all. Are you suggesting I leave the --with-java off the ./configure and, instead put the jdbc jar file somewhere subsequent to the make install? If so, where, exactly should I put it? ----- Original Message ----- From: "Dave Cramer" <Dave@micro-automation.net> To: "Jim Bowery" <jim_bowery@hotmail.com> Cc: <pgsql-jdbc@postgresql.org> Sent: Monday, April 29, 2002 4:40 PM Subject: Re: [JDBC] postgres CVS Against j2sdk1.4 Failure > I'm not exactly sure what I said in the link below, but the driver will > not build under jdk1.4. > > You can use a binary jar compiled under jdk 1.3 in a 1.4 environment > however.