pg.ddx.io pgsql-jdbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Buildfarm: Test errors - StackOverFlowError 2+ messages / 1 participants [nested] [flat]
* Buildfarm: Test errors - StackOverFlowError @ 2011-10-03 15:01 Mike Fowler <mike@mlfowler.com> 0 siblings, 1 reply; 2+ messages in thread From: Mike Fowler @ 2011-10-03 15:01 UTC (permalink / raw) To: pgsql-jdbc Hi, The buildfarm started failing Friday night/Saturday morning with test failures. The tests are breaking when running the JDK 1.4 build, but this does not mean it's only a 1.4 problem (though it could be!) as the build aborts before running 1.5 and 1.6. The failures are against all 4 PG branches I build against - 8.4, 9.0, 9.1 and HEAD. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Buildfarm: Test errors - StackOverFlowError @ 2011-10-03 21:31 Mike Fowler <mike@mlfowler.com> parent: Mike Fowler <mike@mlfowler.com> 0 siblings, 0 replies; 2+ messages in thread From: Mike Fowler @ 2011-10-03 21:31 UTC (permalink / raw) To: pgsql-jdbc On 03/10/11 16:01, I wrote: > > [junit] java.lang.StackOverflowError > [junit] at > org.postgresql.jdbc2.TypeInfoCache.getPGType(TypeInfoCache.java:270) > [junit] at > org.postgresql.jdbc2.TypeInfoCache.getSQLType(TypeInfoCache.java:176) > [junit] at > org.postgresql.jdbc2.AbstractJdbc2ResultSet.getSQLType(AbstractJdbc2ResultSet.java:2776) > [junit] at > org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1920) > [junit] at > org.postgresql.jdbc2.AbstractJdbc2ResultSet.getFixedString(AbstractJdbc2ResultSet.java:2736) > [junit] at > org.postgresql.jdbc3g.Jdbc3gResultSet.createArray(Jdbc3gResultSet.java:59) > [junit] at The tests run for 1.6 but not 1.5 or 1.4. Turns out some code has been added for the binary handling in Jdbc4Array and Jdbc4ResultSet that also needed to be added to Jdbc3Array, Jdbc3ResultSet, Jdbc3gArray and Jdbc3gReultSet. If you take out the different code in the 4 code you get the same StackOverflowError. The attached patch resolves this. Regards, -- Mike Fowler Registered Linux user: 379787 The Call for Papers for is open for FLOSS UK, contact postgresql2012 AT flossuk DOT org for details. Attachments:^ permalink raw reply [nested|flat] 2+ messages in threadstackOverflowError.patch (text/x-diff, 4.4K) download
Index: org/postgresql/jdbc3/Jdbc3Array.java =================================================================== RCS file: /cvsroot/jdbc/pgjdbc/org/postgresql/jdbc3/Jdbc3Array.java,v retrieving revision 1.7 diff -c -r1.7 Jdbc3Array.java *** org/postgresql/jdbc3/Jdbc3Array.java 2 Aug 2011 13:49:01 -0000 1.7 --- org/postgresql/jdbc3/Jdbc3Array.java 3 Oct 2011 21:25:50 -0000 *************** *** 21,26 **** --- 21,31 ---- super(conn, oid, fieldString); } + public Jdbc3Array(BaseConnection conn, int oid, byte[] fieldBytes) throws SQLException + { + super(conn, oid, fieldBytes); + } + public Object getArray(Map map) throws SQLException { return getArrayImpl(map); Index: org/postgresql/jdbc3/Jdbc3ResultSet.java =================================================================== RCS file: /cvsroot/jdbc/pgjdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java,v retrieving revision 1.18 diff -c -r1.18 Jdbc3ResultSet.java *** org/postgresql/jdbc3/Jdbc3ResultSet.java 2 Aug 2011 13:49:01 -0000 1.18 --- org/postgresql/jdbc3/Jdbc3ResultSet.java 3 Oct 2011 21:25:50 -0000 *************** *** 1,9 **** /*------------------------------------------------------------------------- * ! * Copyright (c) 2004-2011, PostgreSQL Global Development Group * * IDENTIFICATION ! * $PostgreSQL: pgjdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java,v 1.18 2011/08/02 13:49:01 davecramer Exp $ * *------------------------------------------------------------------------- */ --- 1,9 ---- /*------------------------------------------------------------------------- * ! * Copyright (c) 2004-2008, PostgreSQL Global Development Group * * IDENTIFICATION ! * $PostgreSQL: pgjdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java,v 1.17 2008/01/08 06:56:29 jurka Exp $ * *------------------------------------------------------------------------- */ *************** *** 56,61 **** --- 56,64 ---- { checkResultSet(i); int oid = fields[i - 1].getOID(); + if (isBinary(i)) { + return new Jdbc3Array(connection, oid, this_row[i - 1]); + } String value = getFixedString(i); return new Jdbc3Array(connection, oid, value); } Index: org/postgresql/jdbc3g/Jdbc3gArray.java =================================================================== RCS file: /cvsroot/jdbc/pgjdbc/org/postgresql/jdbc3g/Jdbc3gArray.java,v retrieving revision 1.7 diff -c -r1.7 Jdbc3gArray.java *** org/postgresql/jdbc3g/Jdbc3gArray.java 2 Aug 2011 13:50:28 -0000 1.7 --- org/postgresql/jdbc3g/Jdbc3gArray.java 3 Oct 2011 21:25:50 -0000 *************** *** 21,26 **** --- 21,31 ---- super(conn, oid, fieldString); } + public Jdbc3gArray(BaseConnection conn, int oid, byte[] fieldBytes) throws SQLException + { + super(conn, oid, fieldBytes); + } + public Object getArray(Map < String, Class < ? >> map) throws SQLException { return getArrayImpl(map); Index: org/postgresql/jdbc3g/Jdbc3gResultSet.java =================================================================== RCS file: /cvsroot/jdbc/pgjdbc/org/postgresql/jdbc3g/Jdbc3gResultSet.java,v retrieving revision 1.11 diff -c -r1.11 Jdbc3gResultSet.java *** org/postgresql/jdbc3g/Jdbc3gResultSet.java 2 Aug 2011 13:50:28 -0000 1.11 --- org/postgresql/jdbc3g/Jdbc3gResultSet.java 3 Oct 2011 21:25:50 -0000 *************** *** 1,9 **** /*------------------------------------------------------------------------- * ! * Copyright (c) 2004-2011, PostgreSQL Global Development Group * * IDENTIFICATION ! * $PostgreSQL: pgjdbc/org/postgresql/jdbc3g/Jdbc3gResultSet.java,v 1.11 2011/08/02 13:50:28 davecramer Exp $ * *------------------------------------------------------------------------- */ --- 1,9 ---- /*------------------------------------------------------------------------- * ! * Copyright (c) 2004-2008, PostgreSQL Global Development Group * * IDENTIFICATION ! * $PostgreSQL: pgjdbc/org/postgresql/jdbc3g/Jdbc3gResultSet.java,v 1.10 2008/09/30 04:34:51 jurka Exp $ * *------------------------------------------------------------------------- */ *************** *** 56,61 **** --- 56,64 ---- { checkResultSet(i); int oid = fields[i - 1].getOID(); + if (isBinary(i)) { + return new Jdbc3gArray(connection, oid, this_row[i - 1]); + } String value = getFixedString(i); return new Jdbc3gArray(connection, oid, value); }
end of thread, other threads:[~2011-10-03 21:31 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2011-10-03 15:01 Buildfarm: Test errors - StackOverFlowError Mike Fowler <mike@mlfowler.com> 2011-10-03 21:31 ` Mike Fowler <mike@mlfowler.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox