pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRowSet error
5+ messages / 2 participants
[nested] [flat]
* RowSet error
@ 2005-03-11 05:54 Michael Laccetti <michael@s2g-limited.com>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Laccetti @ 2005-03-11 05:54 UTC (permalink / raw)
To: pgsql-jdbc
I'm trying to populate a RowSet from a ResultSet, but have been getting a nice
little error: "Invalid column display size. Cannot be less than zero". I
checked the archives, and noticed that somebody else reported this in February.
They suggested changing the source to set it to return 0 in certain methods
instead of -1. I attempted to do the same, rebuild the archive, and tried
again. Nada. Still having the same problem. Is there something that I'm
missing?
Mike
--
---------------------[ Ciphire Signature ]----------------------
From: michael@s2g-limited.com signed email body (387 characters)
Date: on 11 March 2005 at 05:54:32 UTC
To: pgsql-jdbc@postgresql.org
----------------------------------------------------------------
: Ciphire has secured this email against identity theft.
: Free download at www.ciphire.com. The garbled lines
: below are the sender's verifiable digital signature.
----------------------------------------------------------------
00fAAAAAEAAACYMjFCgwEAAD4CAAIAAgACACCF2JwL8FSZ12JHjaqi4keWch0Su1
tLYkwGHFe6dbl/JgEAMU5HZi3bbCGzHuBROgacg8f7vXlTdFsqED3Fgplg8g9nlV
oWQ+FkYllLdGnd4WHDEtZxQ4pxe79Ru/Z9OgA6lg==
------------------[ End Ciphire Signed Message ]----------------
^ permalink raw reply [nested|flat] 5+ messages in thread
* RowSet error
@ 2005-03-13 19:21 Michael Laccetti <michael@s2g-limited.com>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Laccetti @ 2005-03-13 19:21 UTC (permalink / raw)
To: pgsql-jdbc
Note: I sent this a few days ago, but no response. I figure that somebody must
have had this problem, so any help with be mighty appreciated.
I'm trying to populate a RowSet from a ResultSet, but have been getting a nice
little error: "Invalid column display size. Cannot be less than zero". I
checked the archives, and noticed that somebody else reported this in February.
They suggested changing the source to set it to return 0 in certain methods
instead of -1. I attempted to do the same, rebuild the archive, and tried
again. Nada. Still having the same problem. Is there something that I'm
missing?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: RowSet error
@ 2005-03-13 22:05 Kris Jurka <books@ejurka.com>
parent: Michael Laccetti <michael@s2g-limited.com>
0 siblings, 1 reply; 5+ messages in thread
From: Kris Jurka @ 2005-03-13 22:05 UTC (permalink / raw)
To: Michael Laccetti <michael@s2g-limited.com>; +Cc: pgsql-jdbc
On Sun, 13 Mar 2005, Michael Laccetti wrote:
> I'm trying to populate a RowSet from a ResultSet, but have been getting
> a nice little error: "Invalid column display size. Cannot be less than
> zero". I checked the archives, and noticed that somebody else reported
> this in February. They suggested changing the source to set it to return
> 0 in certain methods instead of -1. I attempted to do the same, rebuild
> the archive, and tried again. Nada. Still having the same problem.
> Is there something that I'm missing?
>
You have not shown what you have done and what error you are still
getting, so no one can really tell what the problem is.
The original problem is still in Sun's hands as Amit Handa said he'd ask
around at Sun to see if this is their problem or ours.
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: RowSet error
@ 2005-03-14 15:13 Michael Laccetti <michael@s2g-limited.com>
parent: Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Laccetti @ 2005-03-14 15:13 UTC (permalink / raw)
To: pgsql-jdbc
I did attempt to implement the fix suggested here:
http://archives.postgresql.org/pgsql-jdbc/2005-02/msg00049.php. However, I
still get the same problem. I'm not sure if I've missed something, or if
there's another call somewhere. The stack trace of the exception is:
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:702)
at com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:620)
The specific code trying to populate it seems to be relatively simple:
rslt = stmt.executeQuery(query);
crs.populate(rslt);
That's about all that I have.
Mike
-----Original Message-----
From: Kris Jurka [mailto:books@ejurka.com]
Sent: March 13, 2005 17:06
To: Michael Laccetti
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] RowSet error
On Sun, 13 Mar 2005, Michael Laccetti wrote:
> I'm trying to populate a RowSet from a ResultSet, but have been
> getting a nice little error: "Invalid column display size. Cannot be
> less than zero". I checked the archives, and noticed that somebody
> else reported this in February. They suggested changing the source to
> set it to return 0 in certain methods instead of -1. I attempted to
> do the same, rebuild the archive, and tried again. Nada. Still having the
same problem.
> Is there something that I'm missing?
>
You have not shown what you have done and what error you are still getting, so
no one can really tell what the problem is.
The original problem is still in Sun's hands as Amit Handa said he'd ask around
at Sun to see if this is their problem or ours.
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: RowSet error
@ 2005-03-14 16:27 Michael Laccetti <michael@s2g-limited.com>
parent: Michael Laccetti <michael@s2g-limited.com>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Laccetti @ 2005-03-14 16:27 UTC (permalink / raw)
To: pgsql-jdbc
More information: The problem was originating in
org.postgresql.jdbc2.AbstractJdbc2ResultSetMataData, in getColumnDisplaySize(int
column). For some reason, typmod was set to -5. This was down by the 'variable
length fields' comment, at the bottom of the method. I put in another check to
make sure that if a negative return value was being attempted, bump it to zero.
That seems to have fixed it.
But again, this is very ugly and dirty and wrong. It'll be nice if Sun comes up
with an answer for this.
Mike
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]
On Behalf Of Michael Laccetti
Sent: March 14, 2005 10:14
To: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] RowSet error
I did attempt to implement the fix suggested here:
http://archives.postgresql.org/pgsql-jdbc/2005-02/msg00049.php. However, I
still get the same problem. I'm not sure if I've missed something, or if
there's another call somewhere. The stack trace of the exception is:
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:702)
at com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:620)
The specific code trying to populate it seems to be relatively simple:
rslt = stmt.executeQuery(query);
crs.populate(rslt);
That's about all that I have.
Mike
-----Original Message-----
From: Kris Jurka [mailto:books@ejurka.com]
Sent: March 13, 2005 17:06
To: Michael Laccetti
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] RowSet error
On Sun, 13 Mar 2005, Michael Laccetti wrote:
> I'm trying to populate a RowSet from a ResultSet, but have been
> getting a nice little error: "Invalid column display size. Cannot be
> less than zero". I checked the archives, and noticed that somebody
> else reported this in February. They suggested changing the source to
> set it to return 0 in certain methods instead of -1. I attempted to
> do the same, rebuild the archive, and tried again. Nada. Still having the
same problem.
> Is there something that I'm missing?
>
You have not shown what you have done and what error you are still getting, so
no one can really tell what the problem is.
The original problem is still in Sun's hands as Amit Handa said he'd ask around
at Sun to see if this is their problem or ours.
Kris Jurka
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-03-14 16:27 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-11 05:54 RowSet error Michael Laccetti <michael@s2g-limited.com>
2005-03-13 19:21 RowSet error Michael Laccetti <michael@s2g-limited.com>
2005-03-13 22:05 ` Kris Jurka <books@ejurka.com>
2005-03-14 15:13 ` Michael Laccetti <michael@s2g-limited.com>
2005-03-14 16:27 ` Michael Laccetti <michael@s2g-limited.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