Thread: jdbc compile does not work

jdbc compile does not work

From
"Ravi K.R."
Date:
JDBC compile did not work.


problems faced during installation of postgreSQL7.2.1 version  on linux
during compilation with java/jdbc support which gave error messages and was
not compiled.

1.  Ant java based build tools was successfully installed and classpath was
set.

2. to build the driver --with-java option was added to configure command
line.

$./configure --with-java

3. Then when I issued the 'make' command it gave the following errors
$make

compile:
    [javac] Compiling 53 source files to
/usr/local/src/postgresql-7.2.1/src/int
erfaces/jdbc/build
    [javac]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
dbc2/ResultSet.java:60: org.postgresql.jdbc2.ResultSet should be declared
abstra
ct; it does not define getURL(int) in org.postgresql.jdbc2.ResultSet
    [javac] public class ResultSet extends org.postgresql.ResultSet
implements j
ava.sql.ResultSet
    [javac]        ^
    [javac]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
dbc2/Statement.java:25: org.postgresql.jdbc2.Statement should be declared
abstra
ct; it does not define getMoreResults(int) in org.postgresql.jdbc2.Statement
    [javac] public class Statement extends org.postgresql.Statement
implements j
ava.sql.Statement
    [javac]        ^
    [javac]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
dbc2/Connection.java:37: org.postgresql.jdbc2.Connection should be declared
abst
ract; 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]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
dbc2/DatabaseMetaData.java:40: org.postgresql.jdbc2.DatabaseMetaData should
be d
eclared abstract; it does not define supportsSavepoints() in
org.postgresql.jdbc
2.DatabaseMetaData
    [javac] public class DatabaseMetaData implements
java.sql.DatabaseMetaData
    [javac]        ^
    [javac]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
dbc2/PreparedStatement.java:32: org.postgresql.jdbc2.PreparedStatement
should be
declared abstract; it does not define setURL(int,java.net.URL) in
org.postgresq
l.jdbc2.PreparedStatement
    [javac] public class PreparedStatement extends Statement implements
java.sql
.PreparedStatement
    [javac]        ^
    [javac]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
dbc2/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.Prepared
Statement implements java.sql.CallableStatement
    [javac]        ^
    [javac]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/l
argeobject/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]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/l
argeobject/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]
/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/x
a/ClientConnection.java:70: org.postgresql.xa.ClientConnection should be
declare
d abstract; it does not define setHoldability(int) in
org.postgresql.xa.ClientCo
nnection
    [javac] final class ClientConnection
    [javac]       ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
    [javac] 9 errors

BUILD FAILED

/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/build.xml:72: Compile
failed
, messages should have been provided.

Total time: 31 seconds
make[3]: *** [all] Error 1
make[3]: Leaving directory
`/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/src/postgresql-7.2.1/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/postgresql-7.2.1/src'
make: *** [all] Error 2


please someone help me out in solving this problem.

with regards
ravi



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


Re: jdbc compile does not work

From
Egon Reetz
Date:
I had similar failures with JSDK 1.4, I used 1.3.1_03 instead and everything was
ok.
The build.xml file for the JDBC driver looks for a special class for deciding
between J2EE and J2SE, but there were some changes between 1.3 and 1.4, so this
way doesn't work.

Egon


"Ravi K.R." wrote:

> JDBC compile did not work.
>
> problems faced during installation of postgreSQL7.2.1 version  on linux
> during compilation with java/jdbc support which gave error messages and was
> not compiled.
>
> 1.  Ant java based build tools was successfully installed and classpath was
> set.
>
> 2. to build the driver --with-java option was added to configure command
> line.
>
> $./configure --with-java
>
> 3. Then when I issued the 'make' command it gave the following errors
> $make
>
> compile:
>     [javac] Compiling 53 source files to
> /usr/local/src/postgresql-7.2.1/src/int
> erfaces/jdbc/build
>     [javac]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
> dbc2/ResultSet.java:60: org.postgresql.jdbc2.ResultSet should be declared
> abstra
> ct; it does not define getURL(int) in org.postgresql.jdbc2.ResultSet
>     [javac] public class ResultSet extends org.postgresql.ResultSet
> implements j
> ava.sql.ResultSet
>     [javac]        ^
>     [javac]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
> dbc2/Statement.java:25: org.postgresql.jdbc2.Statement should be declared
> abstra
> ct; it does not define getMoreResults(int) in org.postgresql.jdbc2.Statement
>     [javac] public class Statement extends org.postgresql.Statement
> implements j
> ava.sql.Statement
>     [javac]        ^
>     [javac]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
> dbc2/Connection.java:37: org.postgresql.jdbc2.Connection should be declared
> abst
> ract; 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]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
> dbc2/DatabaseMetaData.java:40: org.postgresql.jdbc2.DatabaseMetaData should
> be d
> eclared abstract; it does not define supportsSavepoints() in
> org.postgresql.jdbc
> 2.DatabaseMetaData
>     [javac] public class DatabaseMetaData implements
> java.sql.DatabaseMetaData
>     [javac]        ^
>     [javac]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
> dbc2/PreparedStatement.java:32: org.postgresql.jdbc2.PreparedStatement
> should be
> declared abstract; it does not define setURL(int,java.net.URL) in
> org.postgresq
> l.jdbc2.PreparedStatement
>     [javac] public class PreparedStatement extends Statement implements
> java.sql
> .PreparedStatement
>     [javac]        ^
>     [javac]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/j
> dbc2/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.Prepared
> Statement implements java.sql.CallableStatement
>     [javac]        ^
>     [javac]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/l
> argeobject/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]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/l
> argeobject/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]
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/org/postgresql/x
> a/ClientConnection.java:70: org.postgresql.xa.ClientConnection should be
> declare
> d abstract; it does not define setHoldability(int) in
> org.postgresql.xa.ClientCo
> nnection
>     [javac] final class ClientConnection
>     [javac]       ^
>     [javac] Note: Some input files use or override a deprecated API.
>     [javac] Note: Recompile with -deprecation for details.
>     [javac] 9 errors
>
> BUILD FAILED
>
> /usr/local/src/postgresql-7.2.1/src/interfaces/jdbc/build.xml:72: Compile
> failed
> , messages should have been provided.
>
> Total time: 31 seconds
> make[3]: *** [all] Error 1
> make[3]: Leaving directory
> `/usr/local/src/postgresql-7.2.1/src/interfaces/jdbc'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/usr/local/src/postgresql-7.2.1/src/interfaces'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/usr/local/src/postgresql-7.2.1/src'
> make: *** [all] Error 2
>
> please someone help me out in solving this problem.
>
> with regards
> ravi
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html