Thread: 7.4.1 fails to compile JDBC

7.4.1 fails to compile JDBC

From
chris@goforit.de
Date:
Hi,

I'm trying to compile the 7.4.1 version with java support. The config is:

RH 3.0 ES (3.2.3_20)
SUN J2SDK1.4.2_03
PostgreSQL 7.4.1 (12/23/03)
Ant 1.5.2_23
JAVA_HOME=/usr/java/j2sdk1.4.2_03
JAVACMD=$JAVA_HOME/bin/java

Result:

thread -o ecpg
gmake[4]: Leaving directory
`/usr/local/src/postgresql-7.4.1/src/interfaces/ecpg/preproc'
gmake[3]: Leaving directory
`/usr/local/src/postgresql-7.4.1/src/interfaces/ecpg'
gmake[3]: Entering directory
`/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc'
/usr/bin/ant -buildfile ./build.xml all
Buildfile: ./build.xml

all:

prepare:
    [mkdir] Created dir:
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/build
    [mkdir] Created dir:
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/jars

check_versions:

check_driver:

driver:
     [copy] Copying 1 file to
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql
     [echo] Configured build for the JDBC3 edition driver with NO SSL

compile:
    [javac] Compiling 77 source files to
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/build
    [javac]
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java:28:
error: Invalid checked exception class `java.sql.SQLException' in
`throws' clause. The exception must be a subclass of an exception
thrown by
`org.postgresql.jdbc1.AbstractJdbc1Statement.createRefCursorResultSet(java.lang.String)'
from class `org.postgresql.jdbc1.AbstractJdbc1Statement'.
    [javac]             public PGRefCursorResultSet
createRefCursorResultSet (String cursorName) throws SQLException
    [javac]                                          ^
    [javac]
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java:23:
error: Invalid checked exception class `java.sql.SQLException' in
`throws' clause. The exception must be a subclass of an exception
thrown by
`org.postgresql.jdbc1.AbstractJdbc1Statement.createRefCursorResultSet(java.lang.String)'
from class `org.postgresql.jdbc1.AbstractJdbc1Statement'.
    [javac]             public PGRefCursorResultSet
createRefCursorResultSet (String cursorName) throws SQLException
    [javac]                                          ^
    [javac]
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3PoolingDataSource.java:29:
error: Method
`org.postgresql.jdbc2.optional.PoolingDataSource.getDataSource(java.lang.String)'
was defined with return type
`org.postgresql.jdbc2.optional.PoolingDataSource' in class
`org.postgresql.jdbc2.optional.PoolingDataSource'.
    [javac]        static Jdbc3PoolingDataSource getDataSource(String name)
    [javac]                                      ^
    [javac]
/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java:23:
error: Invalid checked exception class `java.sql.SQLException' in
`throws' clause. The exception must be a subclass of an exception
thrown by
`org.postgresql.jdbc1.AbstractJdbc1Statement.createRefCursorResultSet(java.lang.String)'
from class `org.postgresql.jdbc1.AbstractJdbc1Statement'.
    [javac]             public PGRefCursorResultSet
createRefCursorResultSet (String cursorName) throws SQLException
    [javac]                                          ^
    [javac] 4 errors

BUILD FAILED
file:/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/build.xml:116:
Compile failed; see the compiler error output for details.

Total time: 1 second
gmake[3]: *** [all] Error 1
gmake[3]: Leaving directory
`/usr/local/src/postgresql-7.4.1/src/interfaces/jdbc'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/local/src/postgresql-7.4.1/src/interfaces'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/local/src/postgresql-7.4.1/src'
gmake: *** [all] Error 2

What can I do?

Thanks
Chris


Re: 7.4.1 fails to compile JDBC

From
chris@goforit.de
Date:
Hey Kris,

thanks for your help!

The problem is that I'm compiling it on a fresh & clean RH 3.0 ES system.
There is only the J2SDK1.4.2_03 and the CLASSPATH is empty.

So I'm pretty much stuck here ...

Thanks
Chris


>> I'm trying to compile the 7.4.1 version with java support. The config is:
>>
>> SUN J2SDK1.4.2_03
>> PostgreSQL 7.4.1 (12/23/03)
>
>> driver:
>>      [copy] Copying 1 file to
>> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql
>>      [echo] Configured build for the JDBC3 edition driver with NO SSL
>
> Something strange is going on here.  It should never try to build a
JDBC3 driver without SSL.  The 1.4 JDK is the only one that supports
JDBC3 and it has SSL included.
>
>>
>> compile:
>>     [javac] Compiling 77 source files to
>> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/build
>>     [javac]
>> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java:28:
error: Invalid checked exception class `java.sql.SQLException' in
`throws' clause. The exception must be a subclass of an exception
thrown by
>> `org.postgresql.jdbc1.AbstractJdbc1Statement.createRefCursorResultSet(java.lang.String)'
from class `org.postgresql.jdbc1.AbstractJdbc1Statement'.
>>     [javac]             public PGRefCursorResultSet
>> createRefCursorResultSet (String cursorName) throws SQLException
>
> This seems to be indicating that it is finding two versions of
> SQLException, another bizarre error.
>
> I would recommend first checking your classpath and seeing if you had
any references to another JDKs internal files.  It is best to compile
with an empty classpath.  If that doesn't help possibly try reinstalling
the jdk.
>
>
> Kris Jurka
>
>




Re: 7.4.1 fails to compile JDBC

From
Kris Jurka
Date:

On Sat, 24 Jan 2004 chris@goforit.de wrote:

> Hey Kris,
>
> thanks for your help!
>
> The problem is that I'm compiling it on a fresh & clean RH 3.0 ES system.
> There is only the J2SDK1.4.2_03 and the CLASSPATH is empty.
>
> So I'm pretty much stuck here ...

Well, something is seriously wrong there, but I have no idea what.  I
don't even have any recommendations on things to try.  I will note that
there is really no need to compile your own version of the JDBC driver and
you can simply download the necessary jar file from
http://jdbc.postgresql.org/download.html

Kris Jurka



Re: 7.4.1 fails to compile JDBC

From
chris@vote4ad.com
Date:
Hey Kris,

thanks for your help!

The problem is that I'm compiling it on a fresh & clean RH 3.0 ES system.
There is only the J2SDK1.4.2_03 and the CLASSPATH is empty.

So I'm pretty much stuck here ...

Thanks
Chris


>> I'm trying to compile the 7.4.1 version with java support. The config
>> is:
>>
>> SUN J2SDK1.4.2_03
>> PostgreSQL 7.4.1 (12/23/03)
>
>> driver:
>>      [copy] Copying 1 file to
>> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql
>>      [echo] Configured build for the JDBC3 edition driver with NO SSL
>
> Something strange is going on here.  It should never try to build a JDBC3
> driver without SSL.  The 1.4 JDK is the only one that supports JDBC3 and
> it has SSL included.
>
>>
>> compile:
>>     [javac] Compiling 77 source files to
>> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/build
>>     [javac]
>> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java:28:
>> error: Invalid checked exception class `java.sql.SQLException' in
>> `throws' clause. The exception must be a subclass of an exception
>> thrown by
>> `org.postgresql.jdbc1.AbstractJdbc1Statement.createRefCursorResultSet(java.lang.String)'
>> from class `org.postgresql.jdbc1.AbstractJdbc1Statement'.
>>     [javac]             public PGRefCursorResultSet
>> createRefCursorResultSet (String cursorName) throws SQLException
>
> This seems to be indicating that it is finding two versions of
> SQLException, another bizarre error.
>
> I would recommend first checking your classpath and seeing if you had any
> references to another JDKs internal files.  It is best to compile with an
> empty classpath.  If that doesn't help possibly try reinstalling the jdk.
>
>
> Kris Jurka
>
>


Re: 7.4.1 fails to compile JDBC

From
Kris Jurka
Date:

On Fri, 23 Jan 2004 chris@goforit.de wrote:

> Hi,
>
> I'm trying to compile the 7.4.1 version with java support. The config is:
>
> SUN J2SDK1.4.2_03
> PostgreSQL 7.4.1 (12/23/03)

> driver:
>      [copy] Copying 1 file to
> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql
>      [echo] Configured build for the JDBC3 edition driver with NO SSL

Something strange is going on here.  It should never try to build a JDBC3
driver without SSL.  The 1.4 JDK is the only one that supports JDBC3 and
it has SSL included.

>
> compile:
>     [javac] Compiling 77 source files to
> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/build
>     [javac]
> /usr/local/src/postgresql-7.4.1/src/interfaces/jdbc/org/postgresql/jdbc3/Jdbc3Statement.java:28:
> error: Invalid checked exception class `java.sql.SQLException' in
> `throws' clause. The exception must be a subclass of an exception
> thrown by
> `org.postgresql.jdbc1.AbstractJdbc1Statement.createRefCursorResultSet(java.lang.String)'
> from class `org.postgresql.jdbc1.AbstractJdbc1Statement'.
>     [javac]             public PGRefCursorResultSet
> createRefCursorResultSet (String cursorName) throws SQLException

This seems to be indicating that it is finding two versions of
SQLException, another bizarre error.

I would recommend first checking your classpath and seeing if you had any
references to another JDKs internal files.  It is best to compile with an
empty classpath.  If that doesn't help possibly try reinstalling the jdk.


Kris Jurka