Follow-up: compiling 7.4 --with-java
От | admin@photoresearchers.com (Photo Researchers) |
---|---|
Тема | Follow-up: compiling 7.4 --with-java |
Дата | |
Msg-id | 32a846dd.0404231143.5033f686@posting.google.com обсуждение исходный текст |
Список | pgsql-admin |
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
В списке pgsql-admin по дате отправления:
Предыдущее
От: ross@stamina.com.au (Ross Ferris)Дата:
Сообщение: Re: How configure Oracle 9i not case sensitive...