Обсуждение: Unable to download/compile postgresql.jar for PG 7.3 with JDK 1.4.1

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

Unable to download/compile postgresql.jar for PG 7.3 with JDK 1.4.1

От
Rich Cullingford
Дата:
All:
This is a brand new installation of PG 7.3 (i.e., no old versions of the
JDBC jar file exist).

I've tried several methods of getting a working driver. First, I
obtained pg73jdbc3.jar from the d/l site. In trying to test it with
DatabaseMetaData, I get the following odd error on a getColumns() call:

Exception in thread "main" java.sql.SQLException: ERROR:  No such
attribute a.oid

         at org.postgresql.Connection.ExecSQL(Connection.java:393)
         at
org.postgresql.jdbc2.DatabaseMetaData.getColumns(DatabaseMetaData.java:1880)
         at com.sysd.sql.SchemaInfo.main(SchemaInfo.java:639)

If I'm interpreting the comments on the JDBC 2.0 Compliance site
correctly, column-type metadata should be supported in PG 7.3.

Next, I tried compiling from source using the --with-java flag to
configure. The 1.4.1 compiler complains about uses of deprecated
classes/methods and missing symbols, and finally craps out:

-----------extract of javac log-------------

      [echo] Configured build for the JDBC2 Enterprise edition driver

compile:
     [javac] Compiling 53 source files to
/n/winwood/u/winwood/rculling/pg/postg
esql-7.2.3/src/interfaces/jdbc/build
     [javac]
/n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
c/org/postgresql/xa/XAConnectionImpl.java:57: cannot resolve symbol
     [javac] symbol  : class RollbackException
     [javac] location: package transaction
     [javac] import javax.transaction.RollbackException;
     [javac]                          ^
     [javac]
/n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
c/org/postgresql/jdbc2/ResultSet.java:60: org.postgresql.jdbc2.ResultSet
should
be declared abstract; it does not define getURL(int) in
org.postgresql.jdbc2.Re
ultSet
     [javac] public class ResultSet extends org.postgresql.ResultSet
implements
ava.sql.ResultSet
     [javac]        ^
     [javac]
/n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
c/org/postgresql/jdbc2/Statement.java:25: org.postgresql.jdbc2.Statement
should
be declared abstract; it does not define getMoreResults(int) in
org.postgresql.
dbc2.Statement
     [javac] public class Statement extends org.postgresql.Statement
implements
ava.sql.Statement
     [javac]        ^
     [javac]
/n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
c/org/postgresql/jdbc2/Connection.java:37:
org.postgresql.jdbc2.Connection shou
d be declared abstract; it does not define setHoldability(int) in
org.postgresq
.jdbc2.Connection

.....etc.....

     [javac]
/n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
c/org/postgresql/xa/ClientConnection.java:70:
org.postgresql.xa.ClientConnectio
  should be declared abstract; it does not define setHoldability(int) in
org.pos
gresql.xa.ClientConnection
     [javac] final class ClientConnection
     [javac]       ^
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -deprecation for details.
     [javac] 10 errors

BUILD FAILED

-----------end extract---------------

I'm guessing these problems are due to the compile problems mentioned in
the archive for jdk 1.4 back in mid-November.

What am I doing wrong? What should I do next? Any hints appreciated.

                        Rich Cullingford
                        System Detection, Inc.
                        rculling@sysd.com




Re: Unable to download/compile postgresql.jar for PG 7.3 with

От
Barry Lind
Дата:
Rich,

I am a bit confused here, you say you are installing 7.3, but the log
you include isn't 7.3 (all the paths are postgresql-7.2.3).  So is this
7.2 or 7.3?

thanks,
--Barry


Rich Cullingford wrote:
> All:
> This is a brand new installation of PG 7.3 (i.e., no old versions of the
> JDBC jar file exist).
>
> I've tried several methods of getting a working driver. First, I
> obtained pg73jdbc3.jar from the d/l site. In trying to test it with
> DatabaseMetaData, I get the following odd error on a getColumns() call:
>
> Exception in thread "main" java.sql.SQLException: ERROR:  No such
> attribute a.oid
>
>         at org.postgresql.Connection.ExecSQL(Connection.java:393)
>         at
> org.postgresql.jdbc2.DatabaseMetaData.getColumns(DatabaseMetaData.java:1880)
>
>         at com.sysd.sql.SchemaInfo.main(SchemaInfo.java:639)
>
> If I'm interpreting the comments on the JDBC 2.0 Compliance site
> correctly, column-type metadata should be supported in PG 7.3.
>
> Next, I tried compiling from source using the --with-java flag to
> configure. The 1.4.1 compiler complains about uses of deprecated
> classes/methods and missing symbols, and finally craps out:
>
> -----------extract of javac log-------------
>
>      [echo] Configured build for the JDBC2 Enterprise edition driver
>
> compile:
>     [javac] Compiling 53 source files to
> /n/winwood/u/winwood/rculling/pg/postg
> esql-7.2.3/src/interfaces/jdbc/build
>     [javac]
> /n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
> c/org/postgresql/xa/XAConnectionImpl.java:57: cannot resolve symbol
>     [javac] symbol  : class RollbackException
>     [javac] location: package transaction
>     [javac] import javax.transaction.RollbackException;
>     [javac]                          ^
>     [javac]
> /n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
> c/org/postgresql/jdbc2/ResultSet.java:60: org.postgresql.jdbc2.ResultSet
> should
> be declared abstract; it does not define getURL(int) in
> org.postgresql.jdbc2.Re
> ultSet
>     [javac] public class ResultSet extends org.postgresql.ResultSet
> implements
> ava.sql.ResultSet
>     [javac]        ^
>     [javac]
> /n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
> c/org/postgresql/jdbc2/Statement.java:25: org.postgresql.jdbc2.Statement
> should
> be declared abstract; it does not define getMoreResults(int) in
> org.postgresql.
> dbc2.Statement
>     [javac] public class Statement extends org.postgresql.Statement
> implements
> ava.sql.Statement
>     [javac]        ^
>     [javac]
> /n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
> c/org/postgresql/jdbc2/Connection.java:37:
> org.postgresql.jdbc2.Connection shou
> d be declared abstract; it does not define setHoldability(int) in
> org.postgresq
> .jdbc2.Connection
>
> .....etc.....
>
>     [javac]
> /n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
> c/org/postgresql/xa/ClientConnection.java:70:
> org.postgresql.xa.ClientConnectio
>  should be declared abstract; it does not define setHoldability(int) in
> org.pos
> gresql.xa.ClientConnection
>     [javac] final class ClientConnection
>     [javac]       ^
>     [javac] Note: Some input files use or override a deprecated API.
>     [javac] Note: Recompile with -deprecation for details.
>     [javac] 10 errors
>
> BUILD FAILED
>
> -----------end extract---------------
>
> I'm guessing these problems are due to the compile problems mentioned in
> the archive for jdk 1.4 back in mid-November.
>
> What am I doing wrong? What should I do next? Any hints appreciated.
>
>                        Rich Cullingford
>                        System Detection, Inc.
>                        rculling@sysd.com
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>



Re: Unable to download/compile postgresql.jar for PG 7.3 with JDK 1.4.1

От
Daniel Bruce Lynes
Дата:
On Thursday 02 January 2003 09:27, Rich Cullingford wrote:

#1.  Your log seems to indicate a 7.2.3 installation, based on the paths.
#2.  If it is 7.3 extracted into a directory called 'postgresql-7.2.3', then
your JAVA_HOME is set incorrectly to point at a JDK 1.3.x or earlier JDK,
instead of JDK 1.4.x.  It shows you're compiling for the J2EE version of the
driver rather than the JDK 1.4 version of the driver (i.e. JDBC 2 EE, not
JDBC 3).

> All:
> This is a brand new installation of PG 7.3 (i.e., no old versions of the
> JDBC jar file exist).
>
> I've tried several methods of getting a working driver. First, I
> obtained pg73jdbc3.jar from the d/l site. In trying to test it with
> DatabaseMetaData, I get the following odd error on a getColumns() call:
>
> Exception in thread "main" java.sql.SQLException: ERROR:  No such
> attribute a.oid
>
>          at org.postgresql.Connection.ExecSQL(Connection.java:393)
>          at
> org.postgresql.jdbc2.DatabaseMetaData.getColumns(DatabaseMetaData.java:1880
>) at com.sysd.sql.SchemaInfo.main(SchemaInfo.java:639)
>
> If I'm interpreting the comments on the JDBC 2.0 Compliance site
> correctly, column-type metadata should be supported in PG 7.3.
>
> Next, I tried compiling from source using the --with-java flag to
> configure. The 1.4.1 compiler complains about uses of deprecated
> classes/methods and missing symbols, and finally craps out:
>
> -----------extract of javac log-------------
>
>       [echo] Configured build for the JDBC2 Enterprise edition driver
>
> compile:
>      [javac] Compiling 53 source files to
> /n/winwood/u/winwood/rculling/pg/postg
> esql-7.2.3/src/interfaces/jdbc/build
>      [javac]
> /n/winwood/u/winwood/rculling/pg/postgresql-7.2.3/src/interfaces/jd
> c/org/postgresql/xa/XAConnectionImpl.java:57: cannot resolve symbol
>      [javac] symbol  : class RollbackException
>      [javac] location: package transaction
>      [javac] import javax.transaction.RollbackException;
>      [javac]                          ^
>      [javac]


Re: Unable to download/compile postgresql.jar for PG 7.3 with JDK 1.4.1

От
Daniel Bruce Lynes
Дата:
On Friday 03 January 2003 06:27, Rich Cullingford wrote about Re: [JDBC]
Unable to download/compile postgresql.jar for PG 7.3 with JDK 1.4.1:

> There was indeed a botch in the version of pg I was working with. So I
> obtained the source tree for pg 7.3 from our local cvs repository,
> checked JAVA_HOME, and ran "make" in the jdbc subdir. I got the
> following errors, most of which seem to be missing symbols from files
> (like Connection.java and ResultSet.java) that appear in the J2EE
> version of the source, but not the JDK 1.4 one.
>
> I'm sure that this is yet another configuration problem, but I can't see
> what it is.

Actually, I had the exact same problem, when trying to compile it that way.
However, when compiling it the way the installation instruction suggest you
do it, it works just fine.  i.e. run ./configure --with-jdbc(?), and then run
make ; make install

It'll build the postgresql.jar file just fine then, without any errors, for
JDBC3.  Just make sure your JAVA_HOME is pointing to the correct directory,
as well as your ANT_HOME, and PATH environment for your Ant bin and JDK bin
directories.

Make sure you're using ANT 1.5.0 or higher, too.  1.5.1 works just fine.