Обсуждение: postgres 7.3 won't compile with jdbc

Поиск
Список
Период
Сортировка

postgres 7.3 won't compile with jdbc

От
Joseph Shraibman
Дата:
make[3]: Entering directory `/local/download/src/postgresql-7.3/src/interfaces/jdbc'
/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: /local/download/src/postgresql-7.3/src/interfaces/jdbc/build
     [mkdir] Created dir: /local/download/src/postgresql-7.3/src/interfaces/jdbc/jars

check_versions:

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

compile:
     [javac] Compiling 56 source files to /local/download/src/postgresql-7.3/src/interfac
es/jdbc/build
     [javac] /local/download/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( connecti
on, i, fields[i - 1], (java.sql.ResultSet) this );
     [javac]                                         ^
     [javac] /local/download/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] /local/download/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).pre
pareStatement(deleteSQL.toString());
     [javac]
                  ^
     [javac] /local/download/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).pre
pareStatement(insertSQL.toString());
     [javac]
                  ^
     [javac] /local/download/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) ins
ertStatement).getLastOID();
     [javac]
  ^
     [javac] /local/download/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).pre
pareStatement(selectSQL.toString());
     [javac]
                  ^
     [javac] /local/download/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) connect
ion).prepareStatement(updateSQL.toString());
     [javac]
                          ^
     [javac] /local/download/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] /local/download/src/postgresql-7.3/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] /local/download/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/
Jdbc2Connection.java:14: org.postgresql.jdbc2.Jdbc2Connection should be declared abstrac
t; it does not define getResultSet(java.sql.Statement,org.postgresql.Field[],java.util.V
ector,java.lang.String,int) in org.postgresql.jdbc1.AbstractJdbc1Connection
     [javac] public class Jdbc2Connection extends org.postgresql.jdbc2.AbstractJdbc2Conne
ction implements java.sql.Connection
     [javac]        ^
     [javac] /local/download/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/
Jdbc2ResultSet.java:13: getStatement() in org.postgresql.jdbc2.AbstractJdbc2ResultSet ca
nnot implement getStatement() in java.sql.ResultSet; attempting to use incompatible retu
rn type
     [javac] found   : org.postgresql.jdbc2.Statement
     [javac] required: java.sql.Statement
     [javac] public class Jdbc2ResultSet extends org.postgresql.jdbc2.AbstractJdbc2Result
Set implements java.sql.ResultSet
     [javac]        ^
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -deprecation for details.
     [javac] 11 errors

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

Total time: 25 seconds
make[3]: *** [all] Error 1
make[3]: Leaving directory `/local/download/src/postgresql-7.3/src/interfaces/jdbc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/local/download/src/postgresql-7.3/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/local/download/src/postgresql-7.3/src'
make: *** [all] Error 2
Command exited with non-zero status 2

-------------------
My java version:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)


Re: postgres 7.3 won't compile with jdbc

От
Fernando Nasser
Дата:
Joseph,

Make sure the previous version of the driver is nowhere in your CLASSPATH.  If
you have added it to your jre/lib/ext directory, remove it from there.

Then retry your compilation.  Let us know if it worked.

Good luck,

Fernando

Joseph Shraibman wrote:> make[3]: Entering directory
> `/local/download/src/postgresql-7.3/src/interfaces/jdbc'
> /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:
> /local/download/src/postgresql-7.3/src/interfaces/jdbc/build
>     [mkdir] Created dir:
> /local/download/src/postgresql-7.3/src/interfaces/jdbc/jars
>
> check_versions:
>
> driver:
>      [copy] Copying 1 file to
> /local/download/src/postgresql-7.3/src/interfaces/jdbc/org
> /postgresql
>      [echo] Configured build for the JDBC2 edition driver
>
> compile:
>     [javac] Compiling 56 source files to
> /local/download/src/postgresql-7.3/src/interfac
> es/jdbc/build
>     [javac]
> /local/download/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( connecti
> on, i, fields[i - 1], (java.sql.ResultSet) this );
>     [javac]                                         ^
>     [javac]
> /local/download/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]
> /local/download/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).pre
> pareStatement(deleteSQL.toString());
>     [javac]
>                  ^
>     [javac]
> /local/download/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).pre
> pareStatement(insertSQL.toString());
>     [javac]
>                  ^
>     [javac]
> /local/download/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) ins
> ertStatement).getLastOID();
>     [javac]
>  ^
>     [javac]
> /local/download/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).pre
> pareStatement(selectSQL.toString());
>     [javac]
>                  ^
>     [javac]
> /local/download/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) connect
> ion).prepareStatement(updateSQL.toString());
>     [javac]
>                          ^
>     [javac]
> /local/download/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]
> /local/download/src/postgresql-7.3/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]
> /local/download/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/
>
> Jdbc2Connection.java:14: org.postgresql.jdbc2.Jdbc2Connection should be
> declared abstrac
> t; it does not define
> getResultSet(java.sql.Statement,org.postgresql.Field[],java.util.V
> ector,java.lang.String,int) in org.postgresql.jdbc1.AbstractJdbc1Connection
>     [javac] public class Jdbc2Connection extends
> org.postgresql.jdbc2.AbstractJdbc2Conne
> ction implements java.sql.Connection
>     [javac]        ^
>     [javac]
> /local/download/src/postgresql-7.3/src/interfaces/jdbc/org/postgresql/jdbc2/
>
> Jdbc2ResultSet.java:13: getStatement() in
> org.postgresql.jdbc2.AbstractJdbc2ResultSet ca
> nnot implement getStatement() in java.sql.ResultSet; attempting to use
> incompatible retu
> rn type
>     [javac] found   : org.postgresql.jdbc2.Statement
>     [javac] required: java.sql.Statement
>     [javac] public class Jdbc2ResultSet extends
> org.postgresql.jdbc2.AbstractJdbc2Result
> Set implements java.sql.ResultSet
>     [javac]        ^
>     [javac] Note: Some input files use or override a deprecated API.
>     [javac] Note: Recompile with -deprecation for details.
>     [javac] 11 errors
>
> BUILD FAILED
> file:/local/download/src/postgresql-7.3/src/interfaces/jdbc/build.xml:104:
> Compile faile
> d; see the compiler error output for details.
>
> Total time: 25 seconds
> make[3]: *** [all] Error 1
> make[3]: Leaving directory
> `/local/download/src/postgresql-7.3/src/interfaces/jdbc'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/local/download/src/postgresql-7.3/src/interfaces'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/local/download/src/postgresql-7.3/src'
> make: *** [all] Error 2
> Command exited with non-zero status 2
>
> -------------------
> My java version:
> java version "1.3.1"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
> Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>



--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Re: postgres 7.3 won't compile with jdbc

От
Joseph Shraibman
Дата:
Fernando Nasser wrote:
> Joseph Shraibman wrote:> Fernando Nasser wrote:
>
>>
>>> Joseph,
>>>
>>> Make sure the previous version of the driver is nowhere in your
>>> CLASSPATH.  If you have added it to your jre/lib/ext directory,
>>> remove it from there.
>>>
>>> Then retry your compilation.  Let us know if it worked.
>>>
>> Yup, that fixed it.
>
>
> Glad to hear that.  I sort of expected it would.
>
>
>> Can't the makefile check for this?
>>
>
> It is annoying isn't it?  I lost hours because of this.
>
>
> It would have to be something with access to the CLASSPATH to check if
> you have the driver there already and ask you to remove it before
> continuing.
>
> If Barry or Dave don't do anything about it (they are the JDBC
> 'committers'), I will try and see what can be done with "ant".

It would be pretty easy to write a java program to do it, but I'm not sure how to
distribute it. Should we echo the source to a text file like configure does? Can we just
include the test.java in the source?



Re: postgres 7.3 won't compile with jdbc

От
Fernando Nasser
Дата:
Joseph,

Please try the attached path (or just hand edit your build.xml file and add that
line in there).  See if it solves the problem for you.

Cheers,
Fernando

Joseph Shraibman wrote:> Fernando Nasser wrote:
>
>> Joseph Shraibman wrote:> Fernando Nasser wrote:
>>
>>>
>>>> Joseph,
>>>>
>>>> Make sure the previous version of the driver is nowhere in your
>>>> CLASSPATH.  If you have added it to your jre/lib/ext directory,
>>>> remove it from there.
>>>>
>>>> Then retry your compilation.  Let us know if it worked.
>>>>
>>> Yup, that fixed it.
>>
>>
>>
>> Glad to hear that.  I sort of expected it would.
>>
>>
>>> Can't the makefile check for this?
>>>
>>
>> It is annoying isn't it?  I lost hours because of this.
>>
>>
>> It would have to be something with access to the CLASSPATH to check if
>> you have the driver there already and ask you to remove it before
>> continuing.
>>
>> If Barry or Dave don't do anything about it (they are the JDBC
>> 'committers'), I will try and see what can be done with "ant".
>
>
> It would be pretty easy to write a java program to do it, but I'm not
> sure how to distribute it. Should we echo the source to a text file like
> configure does? Can we just include the test.java in the source?
>
>



--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9
Index: build.xml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
retrieving revision 1.30
diff -c -p -r1.30 build.xml
*** build.xml    2002/10/20 00:10:55    1.30
--- build.xml    2002/12/04 22:15:53
***************
*** 22,27 ****
--- 22,28 ----
    <property name="builddir" value="build" />
    <property name="package" value="org/postgresql" />
    <property name="debug" value="on" />
+   <property name="build.sysclasspath" value="last" />

    <!--
      This is a simpler method than utils.CheckVersion

Re: postgres 7.3 won't compile with jdbc

От
Joseph Shraibman
Дата:
Nope, that didn't work.

Fernando Nasser wrote:
> Joseph,
>
> Please try the attached path (or just hand edit your build.xml file and
> add that line in there).  See if it solves the problem for you.
>
> Cheers,
> Fernando
>
> Joseph Shraibman wrote:> Fernando Nasser wrote:
>
>>
>>> Joseph Shraibman wrote:> Fernando Nasser wrote:
>>>
>>>>
>>>>> Joseph,
>>>>>
>>>>> Make sure the previous version of the driver is nowhere in your
>>>>> CLASSPATH.  If you have added it to your jre/lib/ext directory,
>>>>> remove it from there.
>>>>>
>>>>> Then retry your compilation.  Let us know if it worked.
>>>>>
>>>> Yup, that fixed it.
>>>
>>>
>>>
>>>
>>> Glad to hear that.  I sort of expected it would.
>>>
>>>
>>>> Can't the makefile check for this?
>>>>
>>>
>>> It is annoying isn't it?  I lost hours because of this.
>>>
>>>
>>> It would have to be something with access to the CLASSPATH to check
>>> if you have the driver there already and ask you to remove it before
>>> continuing.
>>>
>>> If Barry or Dave don't do anything about it (they are the JDBC
>>> 'committers'), I will try and see what can be done with "ant".
>>
>>
>>
>> It would be pretty easy to write a java program to do it, but I'm not
>> sure how to distribute it. Should we echo the source to a text file
>> like configure does? Can we just include the test.java in the source?
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
> Index: build.xml
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/build.xml,v
> retrieving revision 1.30
> diff -c -p -r1.30 build.xml
> *** build.xml    2002/10/20 00:10:55    1.30
> --- build.xml    2002/12/04 22:15:53
> ***************
> *** 22,27 ****
> --- 22,28 ----
>     <property name="builddir" value="build" />
>     <property name="package" value="org/postgresql" />
>     <property name="debug" value="on" />
> +   <property name="build.sysclasspath" value="last" />
>
>     <!--
>       This is a simpler method than utils.CheckVersion


--
Joseph Shraibman
joseph@xtenit.com
Increase signal to noise ratio.  http://xis.xtenit.com


Re: postgres 7.3 won't compile with jdbc

От
Fernando Nasser
Дата:
Joseph Shraibman wrote:
> Nope, that didn't work.
>

It would have been too easy :-(

Thanks for trying it.

Regards,
Fernando

--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9