From xavier.marquis@cegetel.net Wed Jul 13 17:13:34 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 03F3A52BEB for ; Wed, 13 Jul 2005 14:13:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 05979-08 for ; Wed, 13 Jul 2005 17:13:24 +0000 (GMT) Received: from smtp.cegetel.net (mf01.sitadelle.com [212.94.174.68]) by svr1.postgresql.org (Postfix) with ESMTP id 1123C52A2C for ; Wed, 13 Jul 2005 14:13:23 -0300 (ADT) Received: from freeman (unknown [84.5.169.205]) by smtp.cegetel.net (Postfix) with SMTP id 5CFEE3181C9 for ; Wed, 13 Jul 2005 19:13:22 +0200 (CEST) Message-ID: <004501c587cf$652523c0$cda90554@freeman> From: To: Subject: SQLException: Cannot be less than zero Date: Wed, 13 Jul 2005 19:22:06 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0042_01C587E0.283911E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.551 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO, HTML_30_40, HTML_MESSAGE, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200507/69 X-Sequence-Number: 13217 This is a multi-part message in MIME format. ------=_NextPart_000_0042_01C587E0.283911E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 I use PostgreSQL 8.0.3 and following associated drivers :=20 =20 postgresql-8.0-311.jdbc2.jar postgresql-8.0-311.jdbc2ee.jar postgresql-8.0-311.jdbc3.jar =20 I want to use CachedRowSetImpl to populate one row in the following = table : =20 CREATE TABLE "Form2" ( form2member3 int4, form2member5 int8[], ) WITHOUT OIDS; The second column (an array of bigint) seems to cause the following=20 exception when try to populate : =20 java.sql.SQLException: Invalid column display size. Cannot be less than = zero at = javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataIm= pl.java:267) at = com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:679) at com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:597) at = com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.ja= va:170) at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736) at ... at MainTester.main(MainTester.java:41) =20 =20 After reading the only few related subjects, I can't find any=20 solution that I be able to use. (Nebojsa Vasiljevic made a patch but didn't say how to do it ...) Has someone yet met and solved this unexpected problem (even momently) ? Otherwise, Is there another way to deal with variable-length lists ? ------=_NextPart_000_0042_01C587E0.283911E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
  
I use PostgreSQL 8.0.3 and following = associated=20 drivers=20 : 
  
postgresql-8.0-311.jdbc2.jar
postgresql-8.0= -311.jdbc2ee.jar
postgresql-8.0-311.jdbc3.jar
 
I=20 want to use CachedRowSetImpl to populate one row in the following table=20 :
 
CREATE TABLE "Form2"
(
    = form2member3=20 int4,
    form2member5 int8[],
)
WITHOUT = OIDS;

The second column (an array of bigint)  seems to cause the = following
exception when try to populate :
 =20
java.sql.SQLException: Invalid column display size. Cannot be less = than=20 zero
at=20 javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataIm= pl.java:267)
at=20 com.sun.rowset.CachedRowSetImpl.initMetaData(CachedRowSetImpl.java:679)at=20 com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:597)
at= =20 com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.ja= va:170)
at=20 com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)
at = ...
at MainTester.main(MainTester.java:41)
  
 =20
After reading the only few related subjects, I can't find any =
solution=20 that I be able to use.
(Nebojsa Vasiljevic made a patch but didn't = say how to=20 do it ...)

Has someone yet met and solved this unexpected problem = (even=20 momently) ?
Otherwise, Is there another way to deal with = variable-length=20 lists  ?
------=_NextPart_000_0042_01C587E0.283911E0-- From books@ejurka.com Wed Jul 13 17:27:57 2005 X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E1A4252BAD for ; Wed, 13 Jul 2005 14:27:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16775-01 for ; Wed, 13 Jul 2005 17:27:55 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 97B8852B8A for ; Wed, 13 Jul 2005 14:27:53 -0300 (ADT) Received: (qmail 30377 invoked by uid 1112); 13 Jul 2005 17:27:54 -0000 Date: Wed, 13 Jul 2005 12:27:54 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: xavier.marquis@cegetel.net Cc: pgsql-jdbc@postgresql.org Subject: Re: SQLException: Cannot be less than zero In-Reply-To: <004501c587cf$652523c0$cda90554@freeman> Message-ID: References: <004501c587cf$652523c0$cda90554@freeman> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/70 X-Sequence-Number: 13218 On Wed, 13 Jul 2005 xavier.marquis@cegetel.net wrote: > I use PostgreSQL 8.0.3 and I want to use CachedRowSetImpl to populate > one row in the following table : > > CREATE TABLE "Form2" > ( > form2member3 int4, > form2member5 int8[], > ) > > The second column (an array of bigint) seems to cause the following > exception when try to populate : > > java.sql.SQLException: Invalid column display size. Cannot be less than zero > at javax.sql.rowset.RowSetMetaDataImpl.setColumnDisplaySize(RowSetMetaDataImpl.java:267) > > Has someone yet met and solved this unexpected problem (even momently) ? > Otherwise, Is there another way to deal with variable-length lists ? This is a known problem with any variable length data. The postgresql JDBC driver returns -1 to indicate that the display size is unknown which the RowSet implementation doesn't seem to like. People have modified the driver to return 0 in this situation and that allows the rowset to work, but I don't think it's the right thing to do. In the past someone from Sun said they'd look into what we should be doing but they never got back to us. Kris Jurka