pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre Burkovski <AndreyMail@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: 8.4 vs 8.1 AbstractJdbc2Array - Array retrieval
Date: Mon, 17 May 2010 19:41:02 +0200
Message-ID: <4BF17FAE.5060402@gmx.net> (raw)

Hello there,

I have this unexpected Exception
"org.postgresql.util.PSQLException: An I/O error occured while sending 
to the backend."
when i try to recover contents of an java.sql.Array via getArray() method.

I don't have an SSCCE (http://sscce.org/) yet, but for the same piece of 
code i tried both drivers: 8.1.414 and 8.4.701
And for the 8.1.414 the code runs fine. For the 8.4.701 (jdbc3 and jdbc4 
variant) i got the error above.

I did a little digging and debugging and found the following:
The cause of the error can be found in line 165 of 
org.postgresql.jdbc2.AbstractJdbc2Array.java (8.4.701src)
The the line
"connection.getTypeInfo().getArrayDelimiter(oid);"
requires the connection to be open.
This is not the case for 8.1.414!

This creates trouble, as i am using an ORM where data is cached. The 
data is available, but 8.4 driver requires the connection to be open. In 
the case of 8.1 driver the ORM is able to manage the retrieve the data 
via getArray() method although the connection is closed.

Any suggestions or comments? Are you okay with this description or 
should i upload an SSCCE somewhere?

Greetings
Andre B.




view thread (2+ messages)  latest in thread

Message-ID: <4BF17FAE.5060402@gmx.net>
Permalink:  ../4BF17FAE.5060402@gmx.net/
Also on:    postgresql.org/message-id/4BF17FAE.5060402@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: AndreyMail@gmx.net
  Subject: Re: 8.4 vs 8.1 AbstractJdbc2Array - Array retrieval
  In-Reply-To: <4BF17FAE.5060402@gmx.net>
  References: <4BF17FAE.5060402@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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