SQLException: Cannot be less than zero

Started by Nonameover 20 years ago3 messages
#1Noname
xavier.marquis@cegetel.net

Hi,

I use PostgreSQL 8.0.3 and following associated drivers :

postgresql-8.0-311.jdbc2.jar
postgresql-8.0-311.jdbc2ee.jar
postgresql-8.0-311.jdbc3.jar

I want to use CachedRowSetImpl to populate one row in the following table :

CREATE TABLE "Form2"
(
form2member3 int4,
form2member5 int8[],
)
WITHOUT OIDS;

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)
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.java:170)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)
at ...
at MainTester.main(MainTester.java:41)

After reading the only few related subjects, I can't find any 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 ?

#2Noname
xavier.marquis@cegetel.net
In reply to: Noname (#1)
SQLException: Cannot be less than zero ( BUG ? )

Hi,

I use PostgreSQL 8.0.3 and following associated drivers :

postgresql-8.0-311.jdbc2.jar
postgresql-8.0-311.jdbc2ee.jar
postgresql-8.0-311.jdbc3.jar

I want to use CachedRowSetImpl to populate one row in the following table :

CREATE TABLE "Form2"
(
form2member3 int4,
form2member5 int8[],
)
WITHOUT OIDS;

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)
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.java:170)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)
at ...
at MainTester.main(MainTester.java:41)

After reading the only few related subjects, I can't find any 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 ?

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Noname (#1)
Re: SQLException: Cannot be less than zero

This is completely the wrong list to ask this question - you need to ask
on the lists at

http://jdbc.postgresql.org/lists.html

cheers

andrew

xavier.marquis@cegetel.net wrote:

Show quoted text

Hi,

I use PostgreSQL 8.0.3 and following associated drivers :

postgresql-8.0-311.jdbc2.jar
postgresql-8.0-311.jdbc2ee.jar
postgresql-8.0-311.jdbc3.jar

I want to use CachedRowSetImpl to populate one row in the following
table :

CREATE TABLE "Form2"
(
form2member3 int4,
form2member5 int8[],
)
WITHOUT OIDS;
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)
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.java:170)
at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)
at ...
at MainTester.main(MainTester.java:41)

After reading the only few related subjects, I can't find any
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 ?