fastpath error?

fastpath error?

Post by chris markiewic » Thu, 29 Mar 2001 22:07:06



Hello.

I am occasionally (seemingly randomly) seeing the following error when I try
to load a large object.

FastPath call returned ERROR:  lo_close: invalid large obj descriptor (0)

        at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
        at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
        at org.postgresql.largeobject.LargeObject.close(LargeObject.java:105)
        at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:371)
        at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:580)
        at
com.commnav.sbh.framework.persist.JDBCEngine2.loadResultSet(JDBCEngine2.java
:259)
        at com.commnav.sbh.framework.persist.JDBCEngine2.load(JDBCEngine2.java:156)
        at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:147)

Can someone give me some insight on this?  Can I call lo_close explicitly if
i get this error?  Can I ignore it or will that leave me with open
resources?

thanks
chris

---------------------------(end of broadcast)---------------------------

 
 
 

fastpath error?

Post by Peter Mou » Fri, 30 Mar 2001 19:27:39



Quote:>Hello.

>I am occasionally (seemingly randomly) seeing the following error when I try
>to load a large object.

>FastPath call returned ERROR:  lo_close: invalid large obj descriptor (0)

You must setAutoCommit(false) before using any large object.

Can someone give me some insight on this?  Can I call lo_close explicitly if

Quote:>i get this error?  Can I ignore it or will that leave me with open
>resources?

There are no open resources at the time of the error. Because lo's need to
be within a transaction when the transaction closes, so do the lo's.

Peter

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 
 
 

1. jdbc fastpath error & Z error (URGENT NEED!!!)

Hy, Postgresql community!

I'm using:
Linux RedHat6.2,
PostgreSql6.5.3+jdbc6.5-1.2,
jdk1.2.2
(AND I CAN'T CHANGE THIS "KIT")

I've got the below java program and when I type:
# javac PicImmitter.java , it's all ok.
But my problem occours when I run:
#java PicImmitter
..........and this is the error output:

"FastPath protocol error: Z
 at postgresql.fastpath.Fastpath.fastpath(Fastpath.java:159)
 at postgresql.fastpath.Fastpath.fastpath(Fastpath.java:188)
 at postgresql.fastpath.Fastpath.getInteger(Fastpath.java:200)
 at
postgresql.largeobject.LargeObjectManager.create(LargeObjectManager.java:162
)
 at postgresql.jdbc2.PreparedStatement.setBytes(PreparedStatement.java:298)
 at ProvaPicIn.<init>(ProvaPicIn.java:48)
 at ProvaPicIn.main(ProvaPicIn.java:11) "

What can I do, exactly? My Program is:

import java.awt.*;
import java.io.*;
import java.io.FileInputStream;
import java.sql.*;
import postgresql.largeobject.*;
import java.io.IOException;

public class PicImmitter extends Frame{
 public static void main(String args[])
 {
     PicImmitter app = new PicImmitter();
    System.exit(0);
 }

 public PicImmitter()
  try{
    Class.forName("postgresql.Driver");
    Connection conn=DriverManager.getConnection("jdbc:postgresql:best",
                                  "Myuser","Mypwd");
    FileInputStream fis = new FileInputStream("015.jpg");
    int nBytes = fis.available();
    byte [] buff= new byte[nBytes];
    int bytesPhoto = fis.read(buff,0,nBytes);
    String photo = new String(buff);

    conn.setAutoCommit(false);
    PreparedStatement ps = conn.prepareStatement("update players set
                                         image = ? where playercode=? ");
    ps.setBytes(1,photo.getBytes());
    ps.setInt(2,15);
    ps.executeUpdate();

    fis.close();
    ps.close();
    conn.setAutoCommit(true);
    conn.close();
  }catch(Exception ex){
      ex.printStackTrace();
  }
 }

THANK'S A LOT
MARCO FROM ITALY

2. VBA connect string to Oracle - default workspace

3. FastPath

4. is there anyway to know which fields in a dataset are modified? (A Delphi 4 Wish)

5. pgsql/src/backend/tcop (fastpath.c utility.c)

6. Oracle Manufacturing skills needed in Dallas-Live Anywhere.Both F&T

7. pgsql-server/src/backend/tcop fastpath.c

8. Java Applets And DAO

9. pgsql-server/src backend/tcop/fastpath.c inclu ...

10. OpenIngres API / Fastpath

11. DB2 Programming Fastpath

12. pgsql-server/src/backend/tcop fastpath.c postg ...

13. pgsql-server/src/backend/tcop fastpath.c