Thread: compile of jdbc driver failed

compile of jdbc driver failed

From
Chantal Ackermann
Date:
hello all,

if the following problem is already documented somewhere I'm sorry to bother
this list with it. I would be glad if someone could point me to the right
direction.

I want to install the postgresgl 7.2 configured with
--enable-multibyte
--with-java.

configure runs fine but ant fails to compile the driver. I have included the
error messages in this mail (see further down).

I have J2SDK1.4rcb91 Standard Edition installed. ant says that it will build
an Enterterprise Edition driver. I suppose that's because javax.sql is
included in 1.4? I did not check what's in my installation for sure, I assume
there are the same classes as listed in the appropriate API documentation.
But for example, there is no javax.transaction.RollbackException. There is
only a javax.transaction.TransactionRolledbackException.

Is the driver not compatible with jdk 1.4, yet? or do I have to install
another java package (some more javax.sql, or another version??) - if so
which one?

thanx for any help!

Chantal

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ANT MESSAGE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

prepare:
    [mkdir] Created dir: /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/build
    [mkdir] Created dir: /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/jars

check_versions:

driver:
     [copy] Copying 1 file to
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql
     [echo] Configured build for the JDBC2 Enterprise edition driver

compile:
    [javac] Compiling 67 source files to
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/build
    [javac]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/xa/XAConnectionImpl.java:57:
cannot resolve symbol
    [javac] symbol  : class RollbackException
    [javac] location: package transaction
    [javac] import javax.transaction.RollbackException;
    [javac]                          ^
    [javac]
/mnt/MP1/postgresql-7.2/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]
/mnt/MP1/postgresql-7.2/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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.java: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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/CallableStatement.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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/largeobject/PGblob.java: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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/largeobject/PGclob.java: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]
/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/xa/ClientConnection.java:70:
org.postgresql.xa.ClientConnection should be declared abstract; it does not
define setHoldability(int) in org.postgresql.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

/mnt/MP1/postgresql-7.2/src/interfaces/jdbc/build.xml:72: Compile failed,
messages should have been provided.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Re: compile of jdbc driver failed

From
Barry Lind
Date:
Chantal,

The jdbc driver will run under jdk1.4, but will not build under 1.4.  I
would recommend getting the prebuilt jar files from jdbc.postgresql.org.

thanks,
--Barry


Chantal Ackermann wrote:
> hello all,
>
> if the following problem is already documented somewhere I'm sorry to bother
> this list with it. I would be glad if someone could point me to the right
> direction.
>
> I want to install the postgresgl 7.2 configured with
> --enable-multibyte
> --with-java.
>
> configure runs fine but ant fails to compile the driver. I have included the
> error messages in this mail (see further down).
>
> I have J2SDK1.4rcb91 Standard Edition installed. ant says that it will build
> an Enterterprise Edition driver. I suppose that's because javax.sql is
> included in 1.4? I did not check what's in my installation for sure, I assume
> there are the same classes as listed in the appropriate API documentation.
> But for example, there is no javax.transaction.RollbackException. There is
> only a javax.transaction.TransactionRolledbackException.
>
> Is the driver not compatible with jdk 1.4, yet? or do I have to install
> another java package (some more javax.sql, or another version??) - if so
> which one?
>
> thanx for any help!
>
> Chantal
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ANT MESSAGE
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> prepare:
>     [mkdir] Created dir: /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/build
>     [mkdir] Created dir: /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/jars
>
> check_versions:
>
> driver:
>      [copy] Copying 1 file to
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql
>      [echo] Configured build for the JDBC2 Enterprise edition driver
>
> compile:
>     [javac] Compiling 67 source files to
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/build
>     [javac]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/xa/XAConnectionImpl.java:57:
> cannot resolve symbol
>     [javac] symbol  : class RollbackException
>     [javac] location: package transaction
>     [javac] import javax.transaction.RollbackException;
>     [javac]                          ^
>     [javac]
> /mnt/MP1/postgresql-7.2/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]
> /mnt/MP1/postgresql-7.2/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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.java: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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/jdbc2/CallableStatement.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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/largeobject/PGblob.java: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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/largeobject/PGclob.java: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]
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/org/postgresql/xa/ClientConnection.java:70:
> org.postgresql.xa.ClientConnection should be declared abstract; it does not
> define setHoldability(int) in org.postgresql.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
>
> /mnt/MP1/postgresql-7.2/src/interfaces/jdbc/build.xml:72: Compile failed,
> messages should have been provided.
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>



Re: compile of jdbc driver failed

From
Chantal Ackermann
Date:
hi again,

I retried compiling the jdbc driver with jdk1.3 and it worked. I even found
the messages in this mailing list that refer to this incmpability problem.

Does someone know if there is already a patch (or unstable version etc.) of
the driver for jdk1.4?

cheers
Chantal

Re: compile of jdbc driver failed

From
Marc Lavergne
Date:
There was an earlier post about this. The driver works fine with the
1.4.0 JRE, but it does need to be compiled with 1.3.1 due to the fact
that the ANT build.xml file hasn't been update to reflect the 1.4.0 JDK
as of 7.2.0. In brief, the script mistakenly identifies 1.4.0 J2SE as a
J2EE variant. You can easily "kludge" this by changing line 34 in the
build.xml file to read:

...
     <available property="jdk1.2e+" classname="javax.sql.DataSourceX" />
...

This will prevent ANT from mistaking J2SE for J2EE since
javax.sql.DataSourceX doesn't exist in J2SE (or J2EE obviously). You can
then just run make from the command line. However, if you already have
compiled using 1.3.1, it makes no difference, and can just use that
version with the 1.4.0 JRE.

Cheers,

Marc

Chantal Ackermann wrote:

> hi again,
>
> I retried compiling the jdbc driver with jdk1.3 and it worked. I even found
> the messages in this mailing list that refer to this incmpability problem.
>
> Does someone know if there is already a patch (or unstable version etc.) of
> the driver for jdk1.4?
>
> cheers
> Chantal
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



Re: build.xml now builds under jdk1.4, checked into cvs

From
"Dave Cramer"
Date:
Ok, I reworked build.xml to be "smarter" hopefully it is. The upshot is
that you can compile the driver under jdk1.4

Please report any problems to me. I have tested it under jdk1.1, 1.2,
1.3, 1.4 and it built for me, but...

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Marc Lavergne
Sent: Thursday, February 21, 2002 2:20 PM
To: chantal.ackermann@web.de
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] compile of jdbc driver failed


There was an earlier post about this. The driver works fine with the
1.4.0 JRE, but it does need to be compiled with 1.3.1 due to the fact
that the ANT build.xml file hasn't been update to reflect the 1.4.0 JDK
as of 7.2.0. In brief, the script mistakenly identifies 1.4.0 J2SE as a
J2EE variant. You can easily "kludge" this by changing line 34 in the
build.xml file to read:

...
     <available property="jdk1.2e+" classname="javax.sql.DataSourceX" />
...

This will prevent ANT from mistaking J2SE for J2EE since
javax.sql.DataSourceX doesn't exist in J2SE (or J2EE obviously). You can

then just run make from the command line. However, if you already have
compiled using 1.3.1, it makes no difference, and can just use that
version with the 1.4.0 JRE.

Cheers,

Marc

Chantal Ackermann wrote:

> hi again,
>
> I retried compiling the jdbc driver with jdk1.3 and it worked. I even
> found
> the messages in this mailing list that refer to this incmpability
problem.
>
> Does someone know if there is already a patch (or unstable version
> etc.) of
> the driver for jdk1.4?
>
> cheers
> Chantal
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



set parameter not enabled?

From
"Henry"
Date:
I got the following from a jdbc call:
Exception: Callable Statements are not supported at this time.

this exception comes out from a third party pure java report engine, thus
the detailed information is not very much clear to me. When I was using
Oracle as database backend, this exception is not there. however, when I
change to postgres's  pgjdbc2.jar  JDBC driver, this exception raises. Does
that mean Postgres doesn't support stored procesure?

thanks a lot!


Re: set parameter not enabled?

From
Per-Olof Norén
Date:
Henry,
postgresql do support stored procedures.
You just can´t call them with CallableStatement in the jdbc interface.
You should use Statement or PreparedStatement.
There has been discussions on this list earlier. See the archives
Also, look at http://lab.applinet.nl./postgresql-jdbc/

Regards,
Per-Olof Norén

----- Original Message -----
From: "Henry" <hxzhang@cs.ualberta.ca>
To: <pgsql-jdbc@postgresql.org>
Sent: Friday, February 22, 2002 11:00 PM
Subject: [JDBC] set parameter not enabled?


> I got the following from a jdbc call:
> Exception: Callable Statements are not supported at this time.
>
> this exception comes out from a third party pure java report engine, thus
> the detailed information is not very much clear to me. When I was using
> Oracle as database backend, this exception is not there. however, when I
> change to postgres's  pgjdbc2.jar  JDBC driver, this exception raises.
Does
> that mean Postgres doesn't support stored procesure?

>
> thanks a lot!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


Re: set parameter not enabled?

From
"Dave Cramer"
Date:
Henry,

Postgres does not natively support a stored procedure the way that
others do. There is a patch in the pipe which attempts to convert a
Callable statement into a postgres "stored proc", but I'm not sure it
will work.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Henry
Sent: Friday, February 22, 2002 5:00 PM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] set parameter not enabled?


I got the following from a jdbc call:
Exception: Callable Statements are not supported at this time.

this exception comes out from a third party pure java report engine,
thus the detailed information is not very much clear to me. When I was
using Oracle as database backend, this exception is not there. however,
when I change to postgres's  pgjdbc2.jar  JDBC driver, this exception
raises. Does that mean Postgres doesn't support stored procesure?

thanks a lot!


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org