Subject | |
---|---|
Author | msielski@laser.pl |
Post date | 2003-11-14T21:15:37Z |
Hi,
Has anybody used Firebird database with JBoss 3.2.1?
I'am asking because we have some problems with
jdbc driver called jaybird 1.0.1.
I have set up everything as it is described in driver FAQ.
After lunching JBoss and doing some operations
we discovered an exception "TypeConversionException"
thrown by setObject method in PreparedStatement.
JBoss probably use this method to insert all data into
tables.
I have tested that method with following code:
//////////////////////
Class.forName("org.firebirdsql.jdbc.FBDriver");
Connection connection = DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:database", "sysdba", "masterkey");
PreparedStatement statement = connection.prepareStatement("INSERT INTO TB (varchar_id, blob_field) VALUES (?, ?)");
statement.setObject(1,"1");
statement.setObject(2, new CustomClass());
statement.executeUpdate();
statement.close();
connection.close();
//////////////////////
varchar_id has VARCHAR(32) type in database.
blob_id has blob_field type in database.
CustomClass is class written by us.
That code throws TypeConvesionException.
If its normal behaviour can somebody tell
me how use that jdbc driver with JBoss.
I tested application under Mysql database,
mysql jdbc driver and it worked fine.
Thanks in advance
Best regards
Marcin Sielski
--
Laser Systemy Informatyczne S.A.