Subject RE: [Firebird-Java] How2 save javaobject in Firebird ?
Author Rick DeBay
1 is not an object, it is a primitive.

setObject(1, new Integer(1));

And SomeObject must implement, and actually be able
to be serialized.

You may want to explore the website, there are quite a few
papers an tutorials. The blueprints section should also prove

Rick DeBay

-----Original Message-----
From: mozheyko_d [mailto:mozheyko_d@...]
Sent: Friday, December 17, 2004 7:08 AM
Subject: [Firebird-Java] How2 save javaobject in Firebird ?

Hi all !

I need to save java-object in Firebird database
I use:
FirebirdSS-1.5.1 - Linux server
FirebirdSQL-1.5.5JDK1.4 - JDBC driver


create table a(
id integer not null primary key,
rawdata blob

insert code:

PreparedStatement statement = connection.prepareStatement("insert
into a values(?, ?);");
Object o = new SomeObject();
statement.setObject(1, 1);
statement.setObject(2, o);

throws exception:
org.firebirdsql.jdbc.field.TypeConvertionException: Error converting
to object.
at org.firebirdsql.jdbc.field.FBField.setObject(
at Test.main(

Yahoo! Groups Links