pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Result set not positioned properly, perhaps you need to call next().
3+ messages / 2 participants
[nested] [flat]

* Result set not positioned properly, perhaps you need to call next().
@ 2004-11-25 22:42 Manuel Sugawara <masm@fciencias.unam.mx>
  2004-11-25 23:17 ` Re: Result set not positioned properly, perhaps you need to Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Manuel Sugawara @ 2004-11-25 22:42 UTC (permalink / raw)
  To: pgsql-jdbc

I have a system which have been up for years now and recently when
switched to pg74.215.jdbc3.jar it started to fail saying:

org.postgresql.util.PSQLException: Result set not positioned properly, perhaps you need to call next().
        at org.postgresql.jdbc1.AbstractJdbc1ResultSet.checkResultSet(AbstractJdbc1ResultSet.java:823)
        at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:200)
        at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:480)
        at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:155)
        ....

The funny thing is that switching back to pg74.214.jdbc3.jar solves
the problem. Is this a know bug?.

Regards,
Manuel.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Result set not positioned properly, perhaps you need to
  2004-11-25 22:42 Result set not positioned properly, perhaps you need to call next(). Manuel Sugawara <masm@fciencias.unam.mx>
@ 2004-11-25 23:17 ` Oliver Jowett <oliver@opencloud.com>
  2004-11-26 19:33   ` Re: Result set not positioned properly, perhaps you need to Manuel Sugawara <masm@fciencias.unam.mx>
  0 siblings, 1 reply; 3+ messages in thread

From: Oliver Jowett @ 2004-11-25 23:17 UTC (permalink / raw)
  To: Manuel Sugawara <masm@fciencias.unam.mx>; +Cc: pgsql-jdbc

Manuel Sugawara wrote:
> I have a system which have been up for years now and recently when
> switched to pg74.215.jdbc3.jar it started to fail saying:
> 
> org.postgresql.util.PSQLException: Result set not positioned properly, perhaps you need to call next().
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.checkResultSet(AbstractJdbc1ResultSet.java:823)
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:200)
>         at org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1ResultSet.java:480)
>         at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:155)
>         ....
> 
> The funny thing is that switching back to pg74.214.jdbc3.jar solves
> the problem. Is this a know bug?.

Can you show us the application code that causes this? It may be an 
application bug that was hidden by the old driver's behaviour. Newer 
drivers tend to be more aggressive about checking resultset positioning, 
enforcing spec requirements, etc.

-O



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Result set not positioned properly, perhaps you need to
  2004-11-25 22:42 Result set not positioned properly, perhaps you need to call next(). Manuel Sugawara <masm@fciencias.unam.mx>
  2004-11-25 23:17 ` Re: Result set not positioned properly, perhaps you need to Oliver Jowett <oliver@opencloud.com>
@ 2004-11-26 19:33   ` Manuel Sugawara <masm@fciencias.unam.mx>
  0 siblings, 0 replies; 3+ messages in thread

From: Manuel Sugawara @ 2004-11-26 19:33 UTC (permalink / raw)
  To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc

Oliver Jowett <oliver@opencloud.com> writes:

> Can you show us the application code that causes this? It may be an
> application bug that was hidden by the old driver's behaviour. Newer
> drivers tend to be more aggressive about checking resultset positioning,
> enforcing spec requirements, etc.

Never mind. I found the problem in my code, I was calling getString()
after next() returned false. Sorry for the noise.

Regards,
Manuel.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-11-26 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-25 22:42 Result set not positioned properly, perhaps you need to call next(). Manuel Sugawara <masm@fciencias.unam.mx>
2004-11-25 23:17 ` Re: Result set not positioned properly, perhaps you need to Oliver Jowett <oliver@opencloud.com>
2004-11-26 19:33   ` Re: Result set not positioned properly, perhaps you need to Manuel Sugawara <masm@fciencias.unam.mx>

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