Postgresql 7.3.1 + JDBC Build from Source

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

Postgresql 7.3.1 + JDBC Build from Source

От:
Alan Searles <alien@attglobal.net>
Дата:
I am currently running Mandrake Linux 8.2.  uname -r ==> 2.4.18-6mdk. I
have recently installed Sun Java 1.4.1, GNU GCC 3.2.1, as well as
Jakarta ANT 1.5.1 

Now I want to install the latest version of PostgreSQL (7.3.1) from 
source... but I have having some problems getting the JDBC code to
compile properly. 

After I downloaded the source code... and un-compressed it... 

1) I ran the  ./configure  command     (all went well) 
2) I ran the gmake   command 

... and all went well with the  'gmake' until it came to the JDBC code. 
I am getting the following messages: 

================================================================================================= 
[javac]
/usr/src/postgresql-7.3.1/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(
connection, i, fields[i - 1], (java.sql.ResultSet) this ); 
    [javac]
/usr/src/postgresql-7.3.1/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]
/usr/src/postgresql-7.3.1/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).prepareStatement(deleteSQL.toString()); 
::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  
============================================================================================== 

These are a sampling of the messages; there are others. 

What am I doing wrong ?????  I very much want to get the Java interface
into PostgreSQL working. 

/Alan

Re: Postgresql 7.3.1 + JDBC Build from Source

От:
Dave Cramer <Dave@micro-automation.net>
Дата:
Alan,

You likely have an old version of the jar somewhere in the classpath.

Dave
On Fri, 2003-01-17 at 22:02, Alan Searles wrote:
> I am currently running Mandrake Linux 8.2.  uname -r ==> 2.4.18-6mdk. I
> have recently installed Sun Java 1.4.1, GNU GCC 3.2.1, as well as
> Jakarta ANT 1.5.1 
> 
> Now I want to install the latest version of PostgreSQL (7.3.1) from 
> source... but I have having some problems getting the JDBC code to
> compile properly. 
> 
> After I downloaded the source code... and un-compressed it... 
> 
> 1) I ran the  ./configure  command     (all went well) 
> 2) I ran the gmake   command 
> 
> ... and all went well with the  'gmake' until it came to the JDBC code. 
> I am getting the following messages: 
> 
> ================================================================================================= 
> [javac]
> /usr/src/postgresql-7.3.1/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(
> connection, i, fields[i - 1], (java.sql.ResultSet) this ); 
>     [javac]
> /usr/src/postgresql-7.3.1/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]
> /usr/src/postgresql-7.3.1/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).prepareStatement(deleteSQL.toString()); 
> ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  
> ============================================================================================== 
> 
> These are a sampling of the messages; there are others. 
> 
> What am I doing wrong ?????  I very much want to get the Java interface
> into PostgreSQL working. 
> 
> /Alan
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
-- 
Dave Cramer 

Re: Postgresql 7.3.1 + JDBC Build from Source

От:
Alan Searles <alien@attglobal.net>
Дата:
On Fri, 2003-01-17 at 23:16, Dave Cramer wrote:
> Alan,
> 
> You likely have an old version of the jar somewhere in the classpath.
> 
> Dave
> On Fri, 2003-01-17 at 22:02, Alan Searles wrote:
> > I am currently running Mandrake Linux 8.2.  uname -r ==> 2.4.18-6mdk. I
> > have recently installed Sun Java 1.4.1, GNU GCC 3.2.1, as well as
> > Jakarta ANT 1.5.1 
> > 
> > Now I want to install the latest version of PostgreSQL (7.3.1) from 
> > source... but I have having some problems getting the JDBC code to
> > compile properly. 
> > 
> > After I downloaded the source code... and un-compressed it... 
> > 
> > 1) I ran the  ./configure  command     (all went well) 
> > 2) I ran the gmake   command 
> > 
> > ... and all went well with the  'gmake' until it came to the JDBC code. 
> > I am getting the following messages: 
> > 
> > ================================================================================================= 
> > [javac]
> > /usr/src/postgresql-7.3.1/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(
> > connection, i, fields[i - 1], (java.sql.ResultSet) this ); 
> >     [javac]
> > /usr/src/postgresql-7.3.1/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]
> > /usr/src/postgresql-7.3.1/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).prepareStatement(deleteSQL.toString()); 
> > ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  
> > ============================================================================================== 
> > 
> > These are a sampling of the messages; there are others. 
> > 
> > What am I doing wrong ?????  I very much want to get the Java interface
> > into PostgreSQL working. 
> > 
> > /Alan
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> > 
> > http://archives.postgresql.org
> -- 
> Dave Cramer 
> 

   I have included some more messages below from the ANT/JAVA
compilation. As you can see, the CLASSPATH being used is....

   /usr/src/postgresql-7.3.1/src/interfaces/jdbc/build <<-- PGsql 7.3.1

   /usr/local/ant/lib/xml-apis.jar     <<-- ANT 1.5.1
   /usr/local/ant/lib/xercesImpl.jar   <<--
   /usr/local/ant/lib/optional.jar     <<--
   /usr/local/ant/lib/ant.jar          <<--

   /usr/java/j2sdk1.4.1_01/lib/tools.jar  <<-- Java 1.4.1

  I do not understand exactly how more "old" jar code is getting
included ???

 <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
  :   :   :  :  :
   [javac] Compiling 26 source files to
/usr/src/postgresql-7.3.1/src/interfaces/jdbc/build
    [javac] Using modern compiler
    [javac] Compilation arguments:
    [javac] '-d'
    [javac] '/usr/src/postgresql-7.3.1/src/interfaces/jdbc/build'
    [javac] '-classpath'
    [javac]
'/usr/src/postgresql-7.3.1/src/interfaces/jdbc/build:/usr/local/ant/lib/xml-apis.jar:/usr/local/ant/lib/xercesImpl.jar:/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/ant.jar:/usr/java/j2sdk1.4.1_01/lib/tools.jar'
    [javac] '-sourcepath'
    [javac] '/usr/src/postgresql-7.3.1/src/interfaces/jdbc'
    [javac] '-g'
 :  :  :  :  :  :  :  :  
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Re: Postgresql 7.3.1 + JDBC Build from Source

От:
Marcelo Pereira <gandalf@sum.desktop.com.br>
Дата:
Hi,

I have done the following:

1) Install j2sdk
2) Install Jakarta Ant
3) Set up JAVA_HOME, ANT_HOME and PATH environments variables.
4) Install PostgreSQL (7.3.1):
4.1) ./configure --with-java
4.2) make
4.3) make install
5) Set up CLASSPATH
5.1) export CLASSPATH=/usr/local/pgsql/share/java/postgresql.jar:.
     DON'T FORGET THE "."

and I got it running! I think it help you!!

See ya,

Marcelo Pereira

-- Remember that only God and ^[:w saves.
        __
       (_.\           © Marcelo Pereira     |
        / / ___       marcelo@pereira.com   |
       / (_/ _ \__    [Math|99]-IMECC       |
_______\____/_\___)___Unicamp_______________/

--- Alan Searles, with his fast fingers, wrote:

:> On Fri, 2003-01-17 at 23:16, Dave Cramer wrote:
:> > Alan,
:> > 
:> > You likely have an old version of the jar somewhere in the classpath.
:> > 
:> > Dave
:> > On Fri, 2003-01-17 at 22:02, Alan Searles wrote:
:> > > I am currently running Mandrake Linux 8.2.  uname -r ==> 2.4.18-6mdk. I
:> > > have recently installed Sun Java 1.4.1, GNU GCC 3.2.1, as well as
:> > > Jakarta ANT 1.5.1 
:> > > 
:> > > Now I want to install the latest version of PostgreSQL (7.3.1) from 
:> > > source... but I have having some problems getting the JDBC code to
:> > > compile properly. 
:> > > 
:> > > After I downloaded the source code... and un-compressed it... 
:> > > 
:> > > 1) I ran the  ./configure  command     (all went well) 
:> > > 2) I ran the gmake   command 
:> > > 
:> > > ... and all went well with the  'gmake' until it came to the JDBC code. 
:> > > I am getting the following messages: 
:> > > 
:> > > ================================================================================================= 
:> > > [javac]
:> > > /usr/src/postgresql-7.3.1/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(
:> > > connection, i, fields[i - 1], (java.sql.ResultSet) this ); 
:> > >     [javac]
:> > > /usr/src/postgresql-7.3.1/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]
:> > > /usr/src/postgresql-7.3.1/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).prepareStatement(deleteSQL.toString()); 
:> > > ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  ::  
:> > > ============================================================================================== 
:> > > 
:> > > These are a sampling of the messages; there are others. 
:> > > 
:> > > What am I doing wrong ?????  I very much want to get the Java interface
:> > > into PostgreSQL working. 
:> > > 
:> > > /Alan
:> > > 
:> > > 
:> > > ---------------------------(end of broadcast)---------------------------
:> > > TIP 6: Have you searched our list archives?
:> > > 
:> > > http://archives.postgresql.org
:> > -- 
:> > Dave Cramer 
:> > 
:> 
:>    I have included some more messages below from the ANT/JAVA
:> compilation. As you can see, the CLASSPATH being used is....
:> 
:>    /usr/src/postgresql-7.3.1/src/interfaces/jdbc/build <<-- PGsql 7.3.1
:> 
:>    /usr/local/ant/lib/xml-apis.jar     <<-- ANT 1.5.1
:>    /usr/local/ant/lib/xercesImpl.jar   <<--
:>    /usr/local/ant/lib/optional.jar     <<--
:>    /usr/local/ant/lib/ant.jar          <<--
:> 
:>    /usr/java/j2sdk1.4.1_01/lib/tools.jar  <<-- Java 1.4.1
:> 
:>   I do not understand exactly how more "old" jar code is getting
:> included ???
:> 
:>  <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
:>   :   :   :  :  :
:>    [javac] Compiling 26 source files to
:> /usr/src/postgresql-7.3.1/src/interfaces/jdbc/build
:>     [javac] Using modern compiler
:>     [javac] Compilation arguments:
:>     [javac] '-d'
:>     [javac] '/usr/src/postgresql-7.3.1/src/interfaces/jdbc/build'
:>     [javac] '-classpath'
:>     [javac]
:> '/usr/src/postgresql-7.3.1/src/interfaces/jdbc/build:/usr/local/ant/lib/xml-apis.jar:/usr/local/ant/lib/xercesImpl.jar:/usr/local/ant/lib/optional.jar:/usr/local/ant/lib/ant.jar:/usr/java/j2sdk1.4.1_01/lib/tools.jar'
:>     [javac] '-sourcepath'
:>     [javac] '/usr/src/postgresql-7.3.1/src/interfaces/jdbc'
:>     [javac] '-g'
:>  :  :  :  :  :  :  :  :  
:> <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
:> 
:> 
:> ---------------------------(end of broadcast)---------------------------
:> TIP 2: you can get off all lists at once with the unregister command
:>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
:> 

FAQ