I am facing problem to store a file data in oracle blob having file size grater than 4kb. However if i try to store file smaller than 4kb it's working fine.
I get following error.
java.sql.SQLException: Io exception: Software caused connection abort: socket write error at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:345) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2094) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1986) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2697) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457) at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240) at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240) at com.evermind.sql.FilterPreparedStatement.executeUpdate(FilterPreparedStatement.java:240)
even im getting the same kind of error, i tried all possible ways but its giving me the same error. you see if you try a file or data less than 4k it works well and fine but data which exceeds that you get this error. Can you post the code and which database you are trying to use...
"No problem can be solved from the same level of consciousness that created it." Albert Einstein
Joined: Nov 15, 2007
i found one. database using oracle 8i
first what you do is get the OracleConnection instead of jdbc.Connection object. next insert a empty blob object into database then select the blob object that was inserted previously by using
clause because we do update when we are fetching it. now read the file and input it into the blob object.
it worked.. thanks viju vi.
i was also getting same exception in oracle10g with type 4 jdbc driver.
instead of overcoming the limitation of the existing driver by upgrading it, (cannot upload > 4k data) we can use this code with little modifications.