I have one problem when using DBLink.
I defined a table as
CREATE TABLE server_config (
config_title VARCHAR2(32) NOT NULL,
config_categ VARCHAR2(32) NOT NULL,
config_name VARCHAR2(64) NOT NULL,
config_value VARCHAR2(512) NULL
) in DB instance db1

Next, I created a DBlink to db1 from db2 and create a synonym in db2:
CREATE SYNONYM db2.SERVER_CONFIG FOR SERVER_CONFIG@db1

To make sure I am right, I use SQL-plus to insert a record to db2 and it works (the new record appears in db2):
insert into server_config(config_title, config_categ, config_name, config_value) values('test_db_link','inserted','inserted','inser ted'

But when I use JDBC to do the same thing like
stmt = conn.prepareStatement("insert into server_config(config_title, config_categ, config_name, config_value) values(?,?,?,?)");
stmt.setString(1, "test_db_link");
stmt.setString(2, "inserted");
stmt.setString(3, "inserted");
stmt.setString(4, "inserted");
stmt.executeUpdate();

I got an error
ORA-01461 can bind a LONG value only for insert into a LONG column
with ORA-02063 preceding stringstring from stringstring Cause: An Oracle error was received from a remote database link

Also, if I do not use JDBC bind, it will work correctly:
stmt = conn.prepareStatement ("insert into server_config(config_title, config_categ, config_name, config_value) values('test_db_link','inserted','inserted','inser ted')");
stmt.executeUpdate();

That looks really strange to me, because i never use Long in the case.

My env:
Oracle 9.0.1.1.1, JDBC driver 9.0.1.1.0, JAVA 1.3.1_06

Does some guru know the failure reason and can help me out?

Thanks.