db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: java.net.SocketException: Connection reset
Date Thu, 10 May 2007 23:37:40 GMT
Hi Abid,

Abid Hussain wrote:
> Hello everybody,
> 
> I'm using OJB in my web applicatin now for more than one year, and it
>  did really fine.
> 
> But since some time an exception occurs which I can't figure out. 
> Obviously the connection to the backend was reset. May it be the case
> that the db connection timed out? Anybody got an idea what I can do
> about this?
> 
> I found this issue in jira but I'm not sure if it's the same case as
> mine: 
> http://issues.apache.org/jira/browse/OJB-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> 
> 

It could be a similar connection time out issue. In this case try to
- enable automatic reconnect of timed out connections in the jdbc-driver
- or use a validation query
- or enable automatic cleanup of idle connections in the connection pool
to prevent timed out connections.

If the exception only occur under heavy load it could be a concurrency 
issue:
http://archives.postgresql.org/pgsql-jdbc/2006-09/msg00001.php
This could happen when different threads at the same time operate on the 
same PersistenceBroker instance.

regards,
Armin

> 
> Best regards,
> 
> Abid
> 
> Here's the stack trace: ERROR:
> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] * SQLException
> during execution of sql-statement: * sql statement was 'SELECT 
> A0.Id,A0.modul_Name,A0.LP,A0.Zuordnung,A0.Ziele,A0.Inhalte,A0.Literatur,A0.Voraussetzung,A0.Modulpruefung,A0.Selbststudium,A0.Form_Teilnahme,A0.Sprache,A0.Aufwand_Gesamt,A0.Dauer,A0.Haeufigkeit,A0.Sonst_Verantwortliche
>  FROM Modul_2 A0 WHERE A0.Id = ?' * Exception message is [An I/O
> error occured while sending to the backend.] * Vendor error code [0] 
> * SQL state code [08006] * Target class is
> 'modulverwaltung.beans.Module_2' * PK of the target object is [id] *
> The root stack trace is --> * java.net.SocketException: Connection
> reset at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96) 
> at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at
>  
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
>  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
>  at org.postgresql.core.PGStream.flush(PGStream.java:494) at 
> org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:631)
> 
> 
> at 
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:174)
> 
> 
> at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
> 
> 
> at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330)
> 
> 
> at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240)
> 
> 
> at 
> com.p6spy.engine.logging.P6LogPreparedStatement.executeQuery(P6LogPreparedStatement.java:172)
> 
> 
> at 
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.materializeObject(Unknown
>  Source) at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getPlainDBObject(Unknown
>  Source) at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>  Source) at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.doGetObjectByIdentity(Unknown
>  Source) at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>  Source) at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknown
>  Source) at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown
>  Source) at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown
>  Source) at 
> modulverwaltung.persistence.Module_2DAO.findByPrimaryKey(Module_2DAO.java:73)
> 
> 
> at
> modulverwaltung.action.ShowModule.performAction(ShowModule.java:32) 
> at modulverwaltung.controller.Controller.doGet(Controller.java:70) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 
> 
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 
> 
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 
> 
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 
> 
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 
> 
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 
> 
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 
> 
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>  at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>  at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> 
> 
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 
> 
> at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 
> 
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> 
> 
> at java.lang.Thread.run(Thread.java:595)
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message