Thread: JDBC compile error
Hi! I was unable to compile the JDBC driver in the PostgreSQL 6.3.2 source tree. I got 21 errors: ... ./postgresql/DatabaseMetaData.java:2058: class postgresql.ResultSet is an abstract class. It can't be instantiated. return new ResultSet(connection, f, v, "OK", 1); ^ ./postgresql/DatabaseMetaData.java:2433: class postgresql.ResultSet is an abstract class. It can't be instantiated. return new ResultSet(connection, f, v, "OK", 1); ^ 21 errors make: *** [postgresql/CallableStatement.class] Error 1 # My CLASSPATH environment variable was: # echo $CLASSPATH /usr/local/jdk1.1.5/lib/:./ # My System is Debian Bo 1.3 Linux, jdk1.1.5 v6 libc5 version. What can I do? Or could I get somewhere a compiled .jar jdbc driver? Thanks, --tibi -- ---------.Sig-------- Tibor Pap <papt@edasz.hu> ---------------------
On Thu, 23 Jul 1998, Pap Tibor wrote: > Hi! > > I was unable to compile the JDBC driver in the PostgreSQL 6.3.2 source > tree. I got 21 errors: > > ... > ./postgresql/DatabaseMetaData.java:2058: class postgresql.ResultSet is an > abstract class. It can't be instantiated. > return new ResultSet(connection, f, v, "OK", 1); > ^ > ./postgresql/DatabaseMetaData.java:2433: class postgresql.ResultSet is an > abstract class. It can't be instantiated. > return new ResultSet(connection, f, v, "OK", 1); > ^ > 21 errors > make: *** [postgresql/CallableStatement.class] Error 1 > # > > My CLASSPATH environment variable was: > # echo $CLASSPATH > /usr/local/jdk1.1.5/lib/:./ remove the CLASSPATH with: # unset CLASSPATH then run make. These errors are caused by javac getting confused by both the postgresql and java.sql packages This is covered in the README and in the faq http://www.retep.org/postgres -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.retep.org.uk ************ Someday I may rebuild this signature completely ;-) ************ Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
On Thu, Jul 23, 1998 at 06:44:17PM +0100, Peter T Mount wrote: > # unset CLASSPATH > > then run make. These errors are caused by javac getting confused by both > the postgresql and java.sql packages > > This is covered in the README and in the faq > Yes, I have read the README, but: papipc# unset CLASSPATH papipc# echo $CLASSPATH papipc# papipc# make postgresql/CallableStatement.java:213: Method redefined with different return type: postgresql.BigDecimal getBigDecimal(int, int) was java.math.BigDecimal getBigDecimal(int, int) public BigDecimal getBigDecimal(int parameterIndex, int scale) ^ ./postgresql/PreparedStatement.java:0: Class java.math.BigDecimal not found in type declaration. package postgresql; ^ ./postgresql/PreparedStatement.java:27: class postgresql.PreparedStatement must be declared abstract. It does not define void setBigDecimal(int, java.math.BigDecimal) from interface java.sql.PreparedStatement. public class PreparedStatement extends Statement implements java.sql.PreparedStatement [...] ./postgresql/DatabaseMetaData.java:2058: class postgresql.ResultSet is an abstract class. It can't be instantiated. return new ResultSet(connection, f, v, "OK", 1); ^ ./postgresql/DatabaseMetaData.java:2433: class postgresql.ResultSet is an abstract class. It can't be instantiated. return new ResultSet(connection, f, v, "OK", 1); ^ 21 errors make: *** [postgresql/CallableStatement.class] Error 1 So, I got the same errors! --Tibor -- ---------.Sig-------- Tibor Pap <papt@edasz.hu> ---------------------
What is your versio of jdk??? Cyril -- ************************************************************************* * Cyril Ferrand : mailto:cyril.ferrand@sophia.inria.fr * * http://www.mygale.org/05/ironmask * *************************************************************************
On Mon, 27 Jul 1998, Pap Tibor wrote: > postgresql/CallableStatement.java:213: Method redefined with different > return type: postgresql.BigDecimal getBigDecimal(int, int) was > java.math.BigDecimal > getBigDecimal(int, int) > public BigDecimal getBigDecimal(int parameterIndex, int scale) > ^ > ./postgresql/PreparedStatement.java:0: Class java.math.BigDecimal not > found in type declaration. > package postgresql; Ah, I didn't know you had this one. This is caused by the java.math.BigDecimal class being missing from the JDK's classes.zip file. The first thing is to check that you have the most recent release of the JDK (or of the individual version of, ie 1.1.3v1 has problems, but 1.1.3v2 is ok). -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.retep.org.uk ************ Someday I may rebuild this signature completely ;-) ************ Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
On Mon, Jul 27, 1998 at 10:38:55AM +0100, Peter T Mount wrote: > > Ah, I didn't know you had this one. > > This is caused by the java.math.BigDecimal class being missing from the > JDK's classes.zip file. The first thing is to check that you have the most > recent release of the JDK (or of the individual version of, ie 1.1.3v1 has > problems, but 1.1.3v2 is ok). Thank you. My jdk was jdk1.1.5-v5-libc5 for Linux X86. I upgraded the jdk to 1.1.6-v2, and dhe driver was compiled succesfully. Thanks for your help, --Tibor -- ---------.Sig-------- Tibor Pap <papt@edasz.hu> ---------------------