java.sql.SQLException: Io exception: Connection reset by peer: socket.....

hai

when i am tring to store an image into oracle database using the following program

import java.sql.*;

import java.io.*;

import java.util.*;

publicclass test{

publicstaticvoid main(String args[])throws Exception{

FileInputStream fr=new FileInputStream("d:\\murthy\\work\\image\\Photo.JPG");

int l=fr.available();

System.out.println(l);

DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.1:1521:OIRIS","murthy","murthy");

System.in.read();

System.out.println("Connection to Oracle");

String str="insert into itab values(?,?)";

PreparedStatement pstmt=con.prepareStatement(str);

pstmt.setString(1,"1");

pstmt.setBinaryStream(2,fr,l);

pstmt.executeUpdate();

con.close();

}

}

I got this Exception but it works fine in SQLsever

Connection to Oracle

Exception in thread "main" java.sql.SQLException: Io exception: Connection reset by peer: socket write error

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)

at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:648)

at oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePrepare

dStatement.java:485)

at oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatem

ent.java:393)

at oracle.jdbc.driver.OracleConnection.close_statements(OracleConnection

.java:2333)

at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1412)

at test.main(test.java:48)

please help me

[2494 byte] By [santosh528a] at [2007-10-2 16:01:32]
# 1
Look for the LOB sample, here: http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/index.html
StuDerbya at 2007-7-13 16:32:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Hi. The exception you get is at least a bug in the oracledriver or a serious problem happened at the DBMS.It means the driver essentially got hung up on by the DBMS.What is the DDL of the table you are trying to update?Joe Weinstein at BEA Systems
Joe_Weinsteina at 2007-7-13 16:32:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...