From: Jaap Bril <Jaap.Bril@inter.nl.net>
To: pgsql-jdbc@postgresql.org
Subject: I do not understand the exception
Date: Tue, 24 Aug 2004 12:02:31 +0200
Message-ID: <200408241202.31945.Jaap.Bril@inter.nl.net> (raw)
I dont get the error here,
the exception is
SQLEXCEPTION:Storing thumbnail failed:
java.sql.SQLException: ERROR: Bad int8 external representation
"\377\330\377\340\ [.........]
The offending code is:
private void storeThumbnail(ConnectionPool connectionPool, byte[] tn) {
String thumbnail_insert = "INSERT INTO thumbnails VALUES (?)";
try {
dbConn = connectionPool.getConnection();
dbConn.setAutoCommit(false);
PreparedStatement ps = dbConn.prepareStatement(thumbnail_insert);
ps.setBytes(1, tn);
ps.executeUpdate();
ps.close();
}
catch (SQLException e){
System.out.println("SQLEX:Storing thumbnail failed: " + e );
}
}
tn is a
ByteArrayOutputStream().toByteArray() filled with a
JPEGCodec.createJPEGEncoder()
The table thumbnails has a bytea and a serial;
What can be wrong??
TIA
Jaap
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: Jaap.Bril@inter.nl.net
Subject: Re: I do not understand the exception
In-Reply-To: <200408241202.31945.Jaap.Bril@inter.nl.net>
References: <200408241202.31945.Jaap.Bril@inter.nl.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