You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "HARI,SANJAYAGANESH (HP-India,ex2)" <sa...@hp.com> on 2003/03/20 11:22:22 UTC

[DBCP] CLOB Issue?

Hi !
 
I have a piece of code which uses the
PreparedStatement.setCharacterStream(1,<a filereader>,<file size>) and when
I run it via DBCP, when the file size is more than around 5K , I get an
error stack as below. Any clues?
 
java.sql.SQLException: Io exception: Connection aborted by peer: socket
write error
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
        at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1329
)
        at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1
353)
        at
oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
:1807)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
ment.java:332)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatem
ent.java:283)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
reparedStatement.java:179)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
reparedStatement.java:179)
 
-Sanjay

Re: [DBCP] CLOB Issue?

Posted by Rodney Waldhoff <rw...@apache.org>.
I regularly use DBCP with Oracle LOBs, and don't see how DBCP could be
causing this symptom, but it may depend upon your configuration. As a
sanity check, try running the statement without pooling (i.e., go straight
to Oracle) and see if you still have a problem.


The OracleStatement.doExecuteWithTimeout line in your stack trace might be
related this problem.  Is it a function of time rather than size?

On Thu, 20 Mar 2003, HARI,SANJAYAGANESH (HP-India,ex2) wrote:

> Hi !
>
> I have a piece of code which uses the
> PreparedStatement.setCharacterStream(1,<a filereader>,<file size>) and when
> I run it via DBCP, when the file size is more than around 5K , I get an
> error stack as below. Any clues?
>
> java.sql.SQLException: Io exception: Connection aborted by peer: socket
> write error
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
>         at
> oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1329
> )
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1
> 353)
>         at
> oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
> :1807)
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
> ment.java:332)
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatem
> ent.java:283)
>         at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
> reparedStatement.java:179)
>         at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingP
> reparedStatement.java:179)
>
> -Sanjay
>