Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f1CLmOx71073 for ; Mon, 12 Feb 2001 16:48:24 -0500 (EST) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1CG0xx21219 for ; Mon, 12 Feb 2001 11:00:59 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f1CFfnn88373 for pgsql-interfaces@postgresql.org; Mon, 12 Feb 2001 10:41:49 -0500 (EST) (envelope-from news) From: "Mark" X-Newsgroups: comp.databases.postgresql.interfaces Subject: jdbc fastpath error & Z error (URGENT NEED!!!) Date: Sun, 11 Feb 2001 22:36:01 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 81 Message-ID: <96907n$2m9c$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: pgsql-interfaces@postgresql.org X-Archive-Number: 200102/103 X-Sequence-Number: 1060 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.(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