----- Original Message ----- > Daniel, > It is a web application. I was just referring to the java code > in the webapplication. > This is how we retrieve the connection > Class.forName(driver); > ObjectPool connectionPool = new GenericObjectPool(null); > ConnectionFactory connectionFactory = new > DriverManagerConnectionFactory(connectionURI,userName,password); > PoolableConnectionFactory poolableConnectionFactory = new > PoolableConnectionFactory(connectionFactory,connectionPool,null,null,defaultReadOnly,defaultAutoCommit); > coDataSource = new PoolingDataSource(connectionPool); > } > > coDataSource is a static object and a connection is obtained > whenever needed ,using coDataSource.getConnection()
This doesn't look like a Tomcat issue. Your app is maintaining its own connection pool, it is not using one provided by Tomcat. I would suggest that you talk with your developers and see if they can help you. Dan > --- On Fri, 20/7/12, Daniel Mikusa <dmik...@vmware.com> wrote: > > > From: Daniel Mikusa <dmik...@vmware.com> > > Subject: Re: java.sql.SQLException: No more data to read from > > socket > > To: "Tomcat Users List" <users@tomcat.apache.org> > > Date: Friday, 20 July, 2012, 1:59 AM > > ----- Original Message ----- > > > Thanks Daniel. > > > > > > -> DB is getting restarted every weekend but tomcat > > is not getting > > > restarted at the same time. > > > just fyi this issue doesnt happen every time. It > > happens once every > > > month even if the DB is getting restarted every week. > > > So not sure wat is the exact root cause > > > > > ->I have attached the server.xml. I dont find the > > Resource tag here.. > > > > Is the <Resource/> tag defined somewhere else? > > Perhaps in a <Context/> tag? conf/context.xml, > > conf/Catalina/localhost/<app>.xml or > > META-INF/context.xml? > > > > > From java code, a data source is created using > > > PoolableConnectionFactory and GenericObjectPool and > > then a > > > connection is retrieved from this datasource. > > > > What Java code? Your web application? Are you > > manually creating the DataSource and connection pool? > > > > Dan > > > > > > > > > > > > --- On Thu, 19/7/12, Daniel Mikusa <dmik...@vmware.com> > > wrote: > > > > > > > From: Daniel Mikusa <dmik...@vmware.com> > > > > Subject: Re: java.sql.SQLException: No more data > > to read from > > > > socket > > > > To: "Tomcat Users List" <users@tomcat.apache.org> > > > > Date: Thursday, 19 July, 2012, 9:53 PM > > > > ----- Original Message ----- > > > > > Thanks Daniel and Jose. > > > > > Do you knoe what is the root cause of this > > issue > > > > > > > > It's hard to say since you have not answered the > > questions > > > > from my previous email, you have not posted your > > data source > > > > configuration and you have only posted a partial > > stack > > > > trace. > > > > > > > > Nevertheless, I will venture a guess. *If* you > > are in > > > > fact restarting your Oracle database then that > > would > > > > disconnect any persistent connections maintained > > by the > > > > connection pool. > > > > > > > > Given that your connection pool would contain a > > bunch of > > > > connections which have been disconnected, you > > would either > > > > need to restart Tomcat (which will create a fresh > > connection > > > > pool) or configure your connection pool to find > > and replace > > > > the closed connections (hence the suggestion to > > use a > > > > validationQuery). > > > > > > > > That's just a guess though, I do not believe that > > the amount > > > > of information that you have provided is > > sufficient to give > > > > you an exact answer. > > > > > > > > Dan > > > > > > > > > > > > > > > > > > > > > > --- On Thu, 19/7/12, Daniel Mikusa <dmik...@vmware.com> > > > > wrote: > > > > > > > > > > > From: Daniel Mikusa <dmik...@vmware.com> > > > > > > Subject: Re: java.sql.SQLException: No > > more data > > > > to read from > > > > > > socket > > > > > > To: "Tomcat Users List" <users@tomcat.apache.org> > > > > > > Date: Thursday, 19 July, 2012, 5:39 PM > > > > > > ----- Original Message ----- > > > > > > > Jose, > > > > > > > Tomcat is using JDK 1.5 and its > > JDBC > > > > driver.So I am not > > > > > > sure if I > > > > > > > need to upgrade the JDBC driver. > > > > > > > > > > > > >I suspect that whene DB is getting > > restarted, > > > > > > > > > > > > Are you restarting the Oracle database > > without > > > > restarting > > > > > > your Tomcat instance? Depending on how > > your > > > > > > application gets a database connection > > this could > > > > be an > > > > > > issue. > > > > > > > > > > > > > the idle connections are being > > removed. > > > > > > > > > > > > Are you using Tomcat DataSource to > > manage your > > > > > > connections? If so, please include > > your > > > > > > <Resource/> tag. > > > > > > > > > > > > > Not sure how we can avoid this > > situation > > > > > > > > > > > > If you are using a DataSource, you could > > try > > > > adding > > > > > > validation. With DBCP this is done by > > adding a > > > > > > "validationQuery" option. For more > > details, see > > > > the > > > > > > following link. > > > > > > > > > > > > https://commons.apache.org/dbcp/configuration.html > > > > > > > > > > > > Dan > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks and Regards, > > > > > > > Vijay Mathew > > > > > > > > > > > > > > --- On Thu, 19/7/12, Jose María > > Zaragoza > > > > <demablo...@gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > From: Jose María Zaragoza > > <demablo...@gmail.com> > > > > > > > > Subject: Re: > > java.sql.SQLException: No > > > > more data > > > > > > to read from > > > > > > > > socket > > > > > > > > To: "Tomcat Users List" <users@tomcat.apache.org> > > > > > > > > Date: Thursday, 19 July, 2012, > > 1:28 PM > > > > > > > > 2012/7/19 vijay mathew <vijaymathew2...@yahoo.com>: > > > > > > > > > My application is using > > Tomcat 5.5 > > > > It works > > > > > > fine all > > > > > > > > the time however at times when > > I try to > > > > login to > > > > > > the > > > > > > > > application I get the below > > exception > > > > > > > > > java.sql.SQLException: No > > more data > > > > to read > > > > > > from > > > > > > > > socket > > > > > > > > > at > > > > > > > > > > > > > > > > > > > > oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74) > > > > > > > > > at > > > > > > > > > > > > > > > > > > > > oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110) > > > > > > > > > at > > > > > > > > > > > > > > > > > > > > oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171) > > > > > > > > > Once restart , the > > application > > > > works fine. > > > > > > > > > > > > > > > > > > How to fix this issue > > > > > > > > > > > > > > > > > > > > > > > > > Looks like a JDBC driver issue > > . Are you > > > > try to > > > > > > upgrade it > > > > > > > > ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > > To unsubscribe, e-mail: > > > > > > > > users-unsubscr...@tomcat.apache.org > > > > > > > > For additional commands, > > e-mail: > > > > > > > > users-h...@tomcat.apache.org > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > To unsubscribe, e-mail: > > > > > > > users-unsubscr...@tomcat.apache.org > > > > > > > For additional commands, e-mail: > > > > > > > users-h...@tomcat.apache.org > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > > > > For additional commands, e-mail: > > > > > > users-h...@tomcat.apache.org > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org