You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/03/09 17:47:42 UTC

Anybody run into this error with Oracle JDBC?

I get this exception consistently at the same point every time.  Unfortunately, the code was working
yesterday.  The difference is something in the JdbcConnectionPool code.  I can't see what is causing
this to happen, so I am appealling to all of you out there who may have used the Oracle JDBC driver.

WARN    89178   [cocoon  ] (Thread-10): There was an error closing the datasource
java.sql.SQLException: Io exception: Connection reset 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.OracleConnection.setAutoCommit(OracleConnection.java:437)

	at org.apache.avalon.util.datasource.JdbcConnection.setAutoCommit(JdbcConnection.java:73)

	at org.apache.avalon.util.datasource.JdbcConnection.close(JdbcConnection.java:97)

	at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:112)

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Berin Loritsch <bl...@apache.org>.
Steve Muench wrote:
> 
> | > 8.1.7 JDBC driver can connect to any 7.3, 8i, or 9i version of Oracle.
> | > It's just that compared to 8.1.6 JDBC drivers, there are more bug
> | > fixes and a few new features.
> |
> | I tried the newer driver, but to no avail.  I tried uploading a smaller image, and it worked,
> | but on the size image I will be working with, it doesn't.  It is very possible a configuration
> | issue, but I don't know which one.
> |
> | It uploads small <2k images with no problems, but anything in the 128k to 340k range, it
> | fails miserably with the stack trace mentioned before.  Aargh!
> |
> | So does anyone know how to get Oracle to store images that are 128k - 512k in size?  We are
> | talking medium sized images.
> 
> Can you send a simple testcase of what you're trying
> to do as a standalone JDBC program? Seeing what java.sql.* types
> your using and what your database column type is will
> help look into what's going on...

I can give you this much information:

The column is a BLOB type in the DB

I am using a PreparedStatement with

statement.setBinaryStream(position, FileInputStream(file), (int) file.size());

It works for 1k - ?k, but not for much larger images (100x as big).

> 
> ______________________________________________________________
> Steve Muench, Lead XML Evangelist & Consulting Product Manager
> BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
> Author "Building Oracle XML Applications", O'Reilly
> http://www.oreilly.com/catalog/orxmlapp/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Steve Muench <St...@oracle.com>.
| > 8.1.7 JDBC driver can connect to any 7.3, 8i, or 9i version of Oracle.
| > It's just that compared to 8.1.6 JDBC drivers, there are more bug
| > fixes and a few new features.
| 
| I tried the newer driver, but to no avail.  I tried uploading a smaller image, and it worked,
| but on the size image I will be working with, it doesn't.  It is very possible a configuration
| issue, but I don't know which one.
| 
| It uploads small <2k images with no problems, but anything in the 128k to 340k range, it
| fails miserably with the stack trace mentioned before.  Aargh!
| 
| So does anyone know how to get Oracle to store images that are 128k - 512k in size?  We are
| talking medium sized images.

Can you send a simple testcase of what you're trying
to do as a standalone JDBC program? Seeing what java.sql.* types
your using and what your database column type is will
help look into what's going on...

______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Berin Loritsch <bl...@apache.org>.
Steve Muench wrote:
> 
> | > PD: Uses JDBC drivers of 8.1.7, it works fine.
> |
> | I am using classes122.zip (renamed to oracle.jar).
> | I have a feeling that it has to do with a certain size of image that I am uploading
> | to the DB.
> |
> | I will try the newer JDBC drivers.  We are connecting to Oracle 8.1.6.
> 
> 8.1.7 JDBC driver can connect to any 7.3, 8i, or 9i version of Oracle.
> It's just that compared to 8.1.6 JDBC drivers, there are more bug
> fixes and a few new features.

I tried the newer driver, but to no avail.  I tried uploading a smaller image, and it worked,
but on the size image I will be working with, it doesn't.  It is very possible a configuration
issue, but I don't know which one.

It uploads small <2k images with no problems, but anything in the 128k to 340k range, it
fails miserably with the stack trace mentioned before.  Aargh!

So does anyone know how to get Oracle to store images that are 128k - 512k in size?  We are
talking medium sized images.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Steve Muench <St...@oracle.com>.
| > PD: Uses JDBC drivers of 8.1.7, it works fine.
| 
| I am using classes122.zip (renamed to oracle.jar).
| I have a feeling that it has to do with a certain size of image that I am uploading
| to the DB.
| 
| I will try the newer JDBC drivers.  We are connecting to Oracle 8.1.6.

8.1.7 JDBC driver can connect to any 7.3, 8i, or 9i version of Oracle.
It's just that compared to 8.1.6 JDBC drivers, there are more bug
fixes and a few new features.

______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Berin Loritsch <bl...@apache.org>.
Davanum Srinivas wrote:
> 
> Berin,
> 
> Take a look at this message.
> http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=564ddc390a32e93c&seekd=919673285#919673285
> 
> Thanks,
> dims

Thanks to dims' link, I have some example code.  Since Oracle is the Deviant, I will provide a special
case for Oracle in both the Reader and the Writer.  This sucks, and requires that we have multiple
classes to do the same thing--but that's the advantage of OO isn't it?

Oh, in order to do Plug and Play LargeObject handling substitution, I will have to use the AbstractFactory
Pattern and LOB object handler interfaces.  And I was supposed to have this app working today... :(
Looks like I'm going to put some overtime in over the weekend!

> 
> --- Berin Loritsch <bl...@apache.org> wrote:
> > "Marcelo F. Ochoa" wrote:
> > >
> > > Berin Loritsch wrote:
> > >
> > > > I get this exception consistently at the same point every time.  Unfortunately, the code was
> > working
> > > > yesterday.  The difference is something in the JdbcConnectionPool code.  I can't see what is
> > causing
> > > > this to happen, so I am appealling to all of you out there who may have used the Oracle JDBC
> > driver.
> > > >
> > > > WARN    89178   [cocoon  ] (Thread-10): There was an error closing the datasource
> > > > java.sql.SQLException: Io exception: Connection reset 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.OracleConnection.setAutoCommit(OracleConnection.java:437)
> > > >
> > > >       at
> > org.apache.avalon.util.datasource.JdbcConnection.setAutoCommit(JdbcConnection.java:73)
> > > >
> > > >       at org.apache.avalon.util.datasource.JdbcConnection.close(JdbcConnection.java:97)
> > > >
> > > >       at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:112)
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> > > Which classes1xx.zip are you using?
> > > Connection pooling with JDBC dirvers for Oracle 8.1.6 has many problem.
> > > These problem includes "No Thread safe working" and prints user name and
> > > password of the DataSource into System.out.
> > > Best regards, Marcelo.
> > >
> > > PD: Uses JDBC drivers of 8.1.7, it works fine.
> >
> > I am using classes122.zip (renamed to oracle.jar).
> > I have a feeling that it has to do with a certain size of image that I am uploading
> > to the DB.
> >
> > I will try the newer JDBC drivers.  We are connecting to Oracle 8.1.6.
> >
> > >
> > > --
> > > Marcelo F. Ochoa - mochoa@ieee.org
> > > Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
> > > More info?
> > > Chapter 21 of the book "Professional XML Databases" (Wrox Press
> > > http://www.wrox.com/)
> > > Chapter 8 of the book "Oracle & Open Source" (O'Reilly
> > > http://www.oreilly.com/)
> > > -----------------------------------------------
> > > Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
> > > Paraje Arroyo Seco - Campus Universitario
> > > (7000) Tandil - Bs. AS. - Argentina
> > > Te: +54-2293-444430 Fax: +54-2293-444431
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Davanum Srinivas <di...@yahoo.com>.
Berin,

Take a look at this message. 
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=564ddc390a32e93c&seekd=919673285#919673285

Thanks,
dims

--- Berin Loritsch <bl...@apache.org> wrote:
> "Marcelo F. Ochoa" wrote:
> > 
> > Berin Loritsch wrote:
> > 
> > > I get this exception consistently at the same point every time.  Unfortunately, the code was
> working
> > > yesterday.  The difference is something in the JdbcConnectionPool code.  I can't see what is
> causing
> > > this to happen, so I am appealling to all of you out there who may have used the Oracle JDBC
> driver.
> > >
> > > WARN    89178   [cocoon  ] (Thread-10): There was an error closing the datasource
> > > java.sql.SQLException: Io exception: Connection reset 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.OracleConnection.setAutoCommit(OracleConnection.java:437)
> > >
> > >       at
> org.apache.avalon.util.datasource.JdbcConnection.setAutoCommit(JdbcConnection.java:73)
> > >
> > >       at org.apache.avalon.util.datasource.JdbcConnection.close(JdbcConnection.java:97)
> > >
> > >       at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:112)
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > 
> > Which classes1xx.zip are you using?
> > Connection pooling with JDBC dirvers for Oracle 8.1.6 has many problem.
> > These problem includes "No Thread safe working" and prints user name and
> > password of the DataSource into System.out.
> > Best regards, Marcelo.
> > 
> > PD: Uses JDBC drivers of 8.1.7, it works fine.
> 
> I am using classes122.zip (renamed to oracle.jar).
> I have a feeling that it has to do with a certain size of image that I am uploading
> to the DB.
> 
> I will try the newer JDBC drivers.  We are connecting to Oracle 8.1.6.
> 
> > 
> > --
> > Marcelo F. Ochoa - mochoa@ieee.org
> > Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
> > More info?
> > Chapter 21 of the book "Professional XML Databases" (Wrox Press
> > http://www.wrox.com/)
> > Chapter 8 of the book "Oracle & Open Source" (O'Reilly
> > http://www.oreilly.com/)
> > -----------------------------------------------
> > Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
> > Paraje Arroyo Seco - Campus Universitario
> > (7000) Tandil - Bs. AS. - Argentina
> > Te: +54-2293-444430 Fax: +54-2293-444431
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by Berin Loritsch <bl...@apache.org>.
"Marcelo F. Ochoa" wrote:
> 
> Berin Loritsch wrote:
> 
> > I get this exception consistently at the same point every time.  Unfortunately, the code was working
> > yesterday.  The difference is something in the JdbcConnectionPool code.  I can't see what is causing
> > this to happen, so I am appealling to all of you out there who may have used the Oracle JDBC driver.
> >
> > WARN    89178   [cocoon  ] (Thread-10): There was an error closing the datasource
> > java.sql.SQLException: Io exception: Connection reset 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.OracleConnection.setAutoCommit(OracleConnection.java:437)
> >
> >       at org.apache.avalon.util.datasource.JdbcConnection.setAutoCommit(JdbcConnection.java:73)
> >
> >       at org.apache.avalon.util.datasource.JdbcConnection.close(JdbcConnection.java:97)
> >
> >       at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:112)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> Which classes1xx.zip are you using?
> Connection pooling with JDBC dirvers for Oracle 8.1.6 has many problem.
> These problem includes "No Thread safe working" and prints user name and
> password of the DataSource into System.out.
> Best regards, Marcelo.
> 
> PD: Uses JDBC drivers of 8.1.7, it works fine.

I am using classes122.zip (renamed to oracle.jar).
I have a feeling that it has to do with a certain size of image that I am uploading
to the DB.

I will try the newer JDBC drivers.  We are connecting to Oracle 8.1.6.

> 
> --
> Marcelo F. Ochoa - mochoa@ieee.org
> Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
> More info?
> Chapter 21 of the book "Professional XML Databases" (Wrox Press
> http://www.wrox.com/)
> Chapter 8 of the book "Oracle & Open Source" (O'Reilly
> http://www.oreilly.com/)
> -----------------------------------------------
> Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
> Paraje Arroyo Seco - Campus Universitario
> (7000) Tandil - Bs. AS. - Argentina
> Te: +54-2293-444430 Fax: +54-2293-444431
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Anybody run into this error with Oracle JDBC?

Posted by "Marcelo F. Ochoa" <mo...@ieee.org>.
Berin Loritsch wrote:

> I get this exception consistently at the same point every time.  Unfortunately, the code was working
> yesterday.  The difference is something in the JdbcConnectionPool code.  I can't see what is causing
> this to happen, so I am appealling to all of you out there who may have used the Oracle JDBC driver.
> 
> WARN    89178   [cocoon  ] (Thread-10): There was an error closing the datasource
> java.sql.SQLException: Io exception: Connection reset 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.OracleConnection.setAutoCommit(OracleConnection.java:437)
> 
> 	at org.apache.avalon.util.datasource.JdbcConnection.setAutoCommit(JdbcConnection.java:73)
> 
> 	at org.apache.avalon.util.datasource.JdbcConnection.close(JdbcConnection.java:97)
> 
> 	at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:112)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Which classes1xx.zip are you using?
Connection pooling with JDBC dirvers for Oracle 8.1.6 has many problem.
These problem includes "No Thread safe working" and prints user name and 
password of the DataSource into System.out.
Best regards, Marcelo.

PD: Uses JDBC drivers of 8.1.7, it works fine.

-- 
Marcelo F. Ochoa - mochoa@ieee.org
Do you Know DB Prism? Look @ http://www.plenix.com/dbprism/
More info?
Chapter 21 of the book "Professional XML Databases" (Wrox Press 
http://www.wrox.com/)
Chapter 8 of the book "Oracle & Open Source" (O'Reilly 
http://www.oreilly.com/)
-----------------------------------------------
Lab. de Sistemas - Fac. de Cs. Exactas - UNICEN
Paraje Arroyo Seco - Campus Universitario
(7000) Tandil - Bs. AS. - Argentina
Te: +54-2293-444430 Fax: +54-2293-444431


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org