Bug 46768 - postgresql-jdbc fails to build while building interfaces
Summary: postgresql-jdbc fails to build while building interfaces
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-04 22:50 UTC by David Booth
Modified: 2003-03-28 13:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Booth 2003-01-04 22:50:00 UTC
  >Submitter-Id:    current-users
  >Originator:    David Booth
  >Organization:    
  >Confidential:    no
  >Synopsis:    postgresql-jdbc fails to build while building interfaces
  >Severity:    serious
  >Priority:    medium
  >Category:    ports
  >Class:        sw-bug
  >Release:    FreeBSD 4.7-STABLE i386
  >Environment:
 System: FreeBSD 127.0.0.1 4.7-STABLE FreeBSD 4.7-STABLE #4: Thu Dec 12 
 21:19:27 CST 2002 davidb@127.0.0.1:/usr/obj/usr/src/sys/REV3 i386
 jdk1.3.1
 
     
  >Description:
 postgresql-jdbc fails while building interfaces.  Error message
 
 driver:
      [copy] Copying 1 file to 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql
      [echo] Configured build for the JDBC2 edition driver
 
 compile:
     [javac] Compiling 24 source files to 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/build
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:240: 
 cannot resolve symbol
     [javac] symbol  : constructor Array  
 (org.postgresql.PGConnection,int,org.postgresql.Field,java.sql.ResultSet)
     [javac] location: class org.postgresql.jdbc2.Array
     [javac]             return (java.sql.Array) new 
 org.postgresql.jdbc2.Array( connection, i, fields[i - 1], 
 (java.sql.ResultSet) this );
     [javac]                                         ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:420: 
 incompatible types
     [javac] found   : java.sql.Statement
     [javac] required: org.postgresql.jdbc2.Statement
     [javac]             return statement;
     [javac]                        ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:560: 
 incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                     deleteStatement = ((java.sql.Connection) 
 connection).prepareStatement(deleteSQL.toString());
     
 [javac]                                                                                              
 ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:619: 
 incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                     insertStatement = ((java.sql.Connection) 
 connection).prepareStatement(insertSQL.toString());
     
 [javac]                                                                                              
 ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:639: 
 inconvertible types
     [javac] found   : org.postgresql.jdbc2.PreparedStatement
     [javac] required: org.postgresql.jdbc2.AbstractJdbc2Statement
     [javac]                             long insertedOID = 
 ((AbstractJdbc2Statement) insertStatement).getLastOID();
     
 [javac]                                                                              
 ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:955: 
 incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                     selectStatement = ((java.sql.Connection) 
 connection).prepareStatement(selectSQL.toString());
     
 [javac]                                                                                              
 ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java:1038: 
 incompatible types
     [javac] found   : java.sql.PreparedStatement
     [javac] required: org.postgresql.jdbc2.PreparedStatement
     [javac]                             updateStatement = 
 ((java.sql.Connection) connection).prepareStatement(updateSQL.toString());
     
 [javac]                                                                                                      
 ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java:51: 
 inconvertible types
     [javac] found   : org.postgresql.jdbc2.AbstractJdbc2Statement
     [javac] required: org.postgresql.jdbc2.Statement
     [javac]             
 ((AbstractJdbc2ResultSet)result).setStatement((Statement)this);
     
 [javac]                                                                          
 ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java:49: 
 inconvertible types
     [javac] found   : org.postgresql.jdbc2.ResultSet
     [javac] required: org.postgresql.jdbc2.AbstractJdbc2ResultSet
     [javac]             this.rawString = 
 ((AbstractJdbc2ResultSet)rs).getFixedString(idx);
     [javac]                                                           ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/Jdbc2Connection.java:14: 
 org.postgresql.jdbc2.Jdbc2Connection should be declared abstract; it 
 does not define 
 getResultSet(java.sql.Statement,org.postgresql.Field[],java.util.Vector,java.lang.String,int) 
 in org.postgresql.jdbc1.AbstractJdbc1Connection
     [javac] public class Jdbc2Connection extends 
 org.postgresql.jdbc2.AbstractJdbc2Connection implements java.sql.Connection
     [javac]        ^
     [javac] 
 /usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java:13: 
 getStatement() in org.postgresql.jdbc2.AbstractJdbc2ResultSet cannot 
 implement getStatement() in java.sql.ResultSet; attempting to use 
 incompatible return type
     [javac] found   : org.postgresql.jdbc2.Statement
     [javac] required: java.sql.Statement
     [javac] public class Jdbc2ResultSet extends 
 org.postgresql.jdbc2.AbstractJdbc2ResultSet implements java.sql.ResultSet
     [javac]        ^
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -deprecation for details.
     [javac] 11 errors
 
 BUILD FAILED
 file:/usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/build.xml:104: 
 Compile failed; see the compiler error output for details.
 
 Total time: 13 seconds
 gmake: *** [all] Error 1
 gmake: Leaving directory 
 `/usr/ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc'
 *** Error code 2
 
  >How-To-Repeat:
 cd /usr/ports/databases/postgresql-jdbc
 make
  >Fix:
Comment 1 Tom Hukins freebsd_committer freebsd_triage 2003-01-07 09:37:14 UTC
Responsible Changed
From-To: gnats-admin->freebsd-ports

Misfiled Ports Problem Report.
Comment 2 girgen 2003-01-08 18:31:25 UTC
Hi!

Do you know which Java you are using?

Regards,
Palle
Comment 3 Palle Girgensohn 2003-01-08 21:28:37 UTC
Hi,

I cannot reproduce the error. I use Java 1.3.1, just like you.

On my side, it tries to compile 50 source files. You only seem to have 
24? Can it be a problem with you distribution?

compile:
     [javac] Compiling 50 source files to 
/usr/local/home/girgen/ports/usr/local/
ports/databases/postgresql-jdbc/work/postgresql-7.3.1/src/interfaces/jdbc/build
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -deprecation for details.


Regards,
Palle
Comment 4 David Booth 2003-02-24 10:21:04 UTC
I traced this problem to the presence of the postgresql.jar file from a 7.2.3 
build of postgresql-jdbc in /usr/local/share/java/classes.  Evidently, Ant 
puts all of the files thar are in this directory in the java.class.path 
environment ahead of the local directories and some classes in this file were 
being read instead of some with the same names in the build directory causing 
the failure.  The work-around is to move temporarily the postgresql.jar from 
the /usr/local/share/java/classes directory during the build.  A fix that  
modifies the build.xml file to exclude this file from the java.class.path is 
probably a better choice, but I do not have one.

David Booth
Comment 5 Palle Girgensohn 2003-02-24 10:29:22 UTC
Ah, I suspected this. Thanks for the input, I'll see if I can hack up a=20
patch.

/Palle

--On m=E5ndag, februari 24, 2003 04.21.04 -0600 David Booth=20
<wbooth@austin.rr.com> wrote:

> I traced this problem to the presence of the postgresql.jar file from a
> 7.2.3  build of postgresql-jdbc in /usr/local/share/java/classes.
> Evidently, Ant  puts all of the files thar are in this directory in the
> java.class.path  environment ahead of the local directories and some
> classes in this file were  being read instead of some with the same names
> in the build directory causing  the failure.  The work-around is to move
> temporarily the postgresql.jar from  the /usr/local/share/java/classes
> directory during the build.  A fix that   modifies the build.xml file to
> exclude this file from the java.class.path is  probably a better choice,
> but I do not have one.
>
> David Booth
Comment 6 Ernst de Haan freebsd_committer freebsd_triage 2003-03-28 13:50:12 UTC
State Changed
From-To: open->closed

Fixed by PR 48878 resolution.