X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E05C8D1B560 for ; Fri, 23 Apr 2004 16:43:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 54734-02 for ; Fri, 23 Apr 2004 16:43:46 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 44279D1B47D for ; Fri, 23 Apr 2004 16:43:45 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i3NJhiSx094573 for ; Fri, 23 Apr 2004 19:43:44 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i3NJh4NM094467 for pgsql-admin@postgresql.org; Fri, 23 Apr 2004 19:43:04 GMT From: admin@photoresearchers.com (Photo Researchers) X-Newsgroups: comp.databases.postgresql.admin Subject: Follow-up: compiling 7.4 --with-java Date: 23 Apr 2004 12:43:04 -0700 Organization: http://groups.google.com Lines: 100 Message-ID: <32a846dd.0404231143.5033f686@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/310 X-Sequence-Number: 13283 This is a follow-up to an older thread, "compiling 7.4 --with-java" (ref: http://groups.google.com/groups?threadm=3FCCB0D0.CB27E228%40t1.unisoftbg.com&rnum=2). Compiling PostgreSQL 7.4 on RHEL (v.3) with JDBC even using a recent Java SDK (1.4.2) will fail if you attempt to build it with the RH included version of Ant (1.5.2-23). It yields error messages like the following: gmake[3]: Entering directory `/usr/local/src/postgresql-7.4.2/src/interfaces/jdbc' /usr/bin/ant -buildfile ./build.xml all Buildfile: ./build.xml all: prepare: [mkdir] Created dir: /usr/local/src/postgresql-7.4.2/src/interfaces/jdbc/build [mkdir] Created dir: /usr/local/src/postgresql-7.4.2/src/interfaces/jdbc/jars check_versions: check_driver: driver: [copy] Copying 1 file to /usr/local/src/postgresql-7.4.2/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.2/src/interfaces/jdbc/build [javac] /usr/local/src/postgresql-7.4.2/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.2/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.2/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.2/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.2/src/interfaces/jdbc/build.xml:116: Compile failed; see the compiler error output for details. Total time: 0 seconds gmake[3]: *** [all] Error 1 gmake[3]: Leaving directory `/usr/local/src/postgresql-7.4.2/src/interfaces/jdbc' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/local/src/postgresql-7.4.2/src/interfaces' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/usr/local/src/postgresql-7.4.2/src' gmake: *** [all] Error 2 It took me a while to figure out what was causing the problems, but I believe it's the outdated Ant that causes the build to fail. I solved the problem by downloading the most recent binary distribution of Ant (1.6.1), and re-running the configure script and gmake. It's helpful to set the environment variables JAVA_HOME and ANT_HOME to the correct paths of the newly installed releases, and to make sure that the ant binary is in your PATH: export JAVA_HOME=/usr/local/j2sdk1.4.2_04 export ANT_HOME=/usr/local/apache-ant-1.6.1 export PATH=${ANT_HOME}/bin:$PATH I'm posting this here in case someone else runs into this problem and is looking for a documented solution. Cheers, Brian