Problem with LargeObjects (client code attached) - Mailing list pgsql-jdbc

From Rajesh Balla
Subject Problem with LargeObjects (client code attached)
Date
Msg-id MLAPBPGGOLJHEAAA@mailcity.com
Whole thread Raw
List pgsql-jdbc
Problem with LargeObjects

When I used
prepstmt.setBytes(3,bytearray);
the following exception was thrown by the driver: postgresql.fp.error

This exception is being thrown by the fastpath function of the Fastpath class as a result of the call
fp.fastpath("lowrite",false,args)in LargeObject's "write" method. 
What is the reason for this error?
What is the solution?

Thank you very much,
Rajesh

this is the client code:

String query = new String("insert into objectidtest values (?,?)");

outPStmt = dbConnect.prepareStatement(queryString);
        outPStmt.setInt(1,1);
        String imageName = new String("X:/14.gif" );
        File file = new File(imageName);
        FileInputStream fis = new FileInputStream(file);
        byte[] image = new byte[(int)file.length()];
        fis.read(image);
        //Blob b = new byte[(int)file.length()];
        outPStmt.setBytes(2,image);


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

pgsql-jdbc by date:

Previous
From: "Rajesh Balla"
Date:
Subject: Problem using LargeObjects
Next
From: nusa
Date:
Subject: HELP : Can't load JDBC driver !