pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC and LO - invalid large object descriptor
3+ messages / 3 participants
[nested] [flat]

* JDBC and LO - invalid large object descriptor
@ 2000-09-24 13:28 Andreas Vogler <Andreas.Vogler@geneon.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andreas Vogler @ 2000-09-24 13:28 UTC (permalink / raw)
  To: pgsql-interfaces

Hi,

I have got a problem with reading large objects from Postgres through JDBC
(both 7.0.2):
a call to resultset.getBytes(...) results in:

FastPath call returned ERROR:  lo_tell: invalid large object descriptor (0)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
at org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
at org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)

using "select lo_export(...)" is no problem, so I suppose the data is stored
correctly within the DB.
Any idea where the 0 is comming from or what the problem could be?

Bye
	Andreas




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

* RE: JDBC and LO - invalid large object descriptor
@ 2000-09-29 02:20 Dnesbitt@encryptix.com
  2000-10-02 18:58 ` Re: JDBC and LO - invalid large object descriptor Nelson Ferreira Jr <nelson@radix.com.br>
  0 siblings, 1 reply; 3+ messages in thread

From: Dnesbitt@encryptix.com @ 2000-09-29 02:20 UTC (permalink / raw)
  To: Andreas.Vogler@geneon.de; +Cc: Dnesbitt@encryptix.com; pgsql-interfaces

Andreas,

Are you doing the following prior to your executeQuery() method call?

            conn.setAutoCommit(false);

If not, then I think that may be your problem.  It may seem weird to do a
query in a transaction, but that is how it works.

Regards,
//Dave

> -----Original Message-----
> From: Andreas Vogler [mailto:Andreas.Vogler@geneon.de]
> Sent: Sunday, September 24, 2000 6:29 AM
> To: pgsql-interfaces@postgresql.org
> Subject: [INTERFACES] JDBC and LO - invalid large object descriptor
> 
> 
> Hi,
> 
> I have got a problem with reading large objects from Postgres 
> through JDBC
> (both 7.0.2):
> a call to resultset.getBytes(...) results in:
> 
> FastPath call returned ERROR:  lo_tell: invalid large object 
> descriptor (0)
> at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
> at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
> at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
> at org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
> at org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
> at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)
> 
> using "select lo_export(...)" is no problem, so I suppose the 
> data is stored
> correctly within the DB.
> Any idea where the 0 is comming from or what the problem could be?
> 
> Bye
> 	Andreas
> 



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

* Re: JDBC and LO - invalid large object descriptor
  2000-09-29 02:20 RE: JDBC and LO - invalid large object descriptor Dnesbitt@encryptix.com
@ 2000-10-02 18:58 ` Nelson Ferreira Jr <nelson@radix.com.br>
  0 siblings, 0 replies; 3+ messages in thread

From: Nelson Ferreira Jr @ 2000-10-02 18:58 UTC (permalink / raw)
  To: Dnesbitt@encryptix.com; pgsql-interfaces

          I also got these errors even doing
                conn.setAutoCommit(false);
         in a high-load enviroment.
         The solution is that you have to do a
               conn.commit();
         after acessing the BLOB (even if you're only reading data)


                                                              []'s


Dnesbitt@encryptix.com wrote:

> Andreas,
>
> Are you doing the following prior to your executeQuery() method call?
>
>             conn.setAutoCommit(false);
>
> If not, then I think that may be your problem.  It may seem weird to do a
> query in a transaction, but that is how it works.
>
> Regards,
> //Dave
>
> > -----Original Message-----
> > From: Andreas Vogler [mailto:Andreas.Vogler@geneon.de]
> > Sent: Sunday, September 24, 2000 6:29 AM
> > To: pgsql-interfaces@postgresql.org
> > Subject: [INTERFACES] JDBC and LO - invalid large object descriptor
> >
> >
> > Hi,
> >
> > I have got a problem with reading large objects from Postgres
> > through JDBC
> > (both 7.0.2):
> > a call to resultset.getBytes(...) results in:
> >
> > FastPath call returned ERROR:  lo_tell: invalid large object
> > descriptor (0)
> > at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
> > at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
> > at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:203)
> > at org.postgresql.largeobject.LargeObject.tell(LargeObject.java:232)
> > at org.postgresql.largeobject.LargeObject.size(LargeObject.java:247)
> > at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:370)
> >
> > using "select lo_export(...)" is no problem, so I suppose the
> > data is stored
> > correctly within the DB.
> > Any idea where the 0 is comming from or what the problem could be?
> >
> > Bye
> >       Andreas
> >




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


end of thread, other threads:[~2000-10-02 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-24 13:28 JDBC and LO - invalid large object descriptor Andreas Vogler <Andreas.Vogler@geneon.de>
2000-09-29 02:20 RE: JDBC and LO - invalid large object descriptor Dnesbitt@encryptix.com
2000-10-02 18:58 ` Nelson Ferreira Jr <nelson@radix.com.br>

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