Results 1 to 6 of 6
  1. #1
    kminev is offline Member
    Join Date
    Oct 2009
    Posts
    14
    Rep Power
    0

    Default [RPC Fault faultString="org.springframework.dao.DataAccessRes ourceFailureException :

    Hi,

    I have two web applications with java back end both running on apache tomcat and they both throw the same exception.

    If I leave the web application unused for a while few hours up to a day when I try to access it I see the same error.

    Any ideas pointer suggestion will be greatly appreciated.

    Here is the complete exception:

    [RPC Fault faultString="org.springframework.dao.DataAccessRes ourceFailureException : StatementCallback; SQL [SELECT * from company ORDER BY name]; Communications link failure due to underlying exception:

    ** BEGIN NESTED EXCEPTION **

    java.net.SocketException
    MESSAGE: Software caused connection abort: recv failed

    STACKTRACE:

    java.net.SocketException: Software caused connection abort: recv failed

    at java.net.SocketInputStream.socketRead0(Native Method)

    at java.net.SocketInputStream.read(SocketInputStream. java:129)

    at com.mysql.jdbc.util.ReadAheadInputStream.fill(Read AheadInputStream.java:113)

    at com.mysql.jdbc.util.ReadAheadInputStream.readFromU nderlyingStreamIfNecessary(ReadAheadInputStream.ja va:160)

    at com.mysql.jdbc.util.ReadAheadInputStream.read(Read AheadInputStream.java:188)

    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910 )

    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2304)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2803)

    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15 73)

    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1665)

    at com.mysql.jdbc.Connection.execSQL(Connection.java: 3170)

    at com.mysql.jdbc.Connection.execSQL(Connection.java: 3099)

    at com.mysql.jdbc.Statement.executeQuery(Statement.ja va:1169)

    at com.mchange.v2.c3p0.impl.NewProxyStatement.execute Query(NewProxyStatement.java:35)

    at org.springframework.jdbc.core.JdbcTemplate$1QueryS tatementCallback.doInStatement(JdbcTemplate.java:4 43)

    at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:396)

    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:458)

    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:466)

    at org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:187)

    at com.seventicks.correlate.dao.jdbc.CompanyJDBCImpl. getAllCompanys(CompanyJDBCImpl.java:163)

    at com.seventicks.correlate.service.impl.DefaultCompa nyService.getAllCompanys(DefaultCompanyService.jav a:45)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at flex.messaging.services.remoting.adapters.JavaAdap ter.invoke(JavaAdapter.java:421)

    at flex.messaging.services.RemotingService.serviceMes sage(RemotingService.java:183)

    at flex.messaging.MessageBroker.routeMessageToService (MessageBroker.java:1503)

    at flex.messaging.endpoints.AbstractEndpoint.serviceM essage(AbstractEndpoint.java:884)

    at flex.messaging.endpoints.amf.MessageBrokerFilter.i nvoke(MessageBrokerFilter.java:121)

    at flex.messaging.endpoints.amf.LegacyFilter.invoke(L egacyFilter.java:158)

    at flex.messaging.endpoints.amf.SessionFilter.invoke( SessionFilter.java:44)

    at flex.messaging.endpoints.amf.BatchProcessFilter.in voke(BatchProcessFilter.java:67)

    at flex.messaging.endpoints.amf.SerializationFilter.i nvoke(SerializationFilter.java:146)

    at flex.messaging.endpoints.BaseHTTPEndpoint.service( BaseHTTPEndpoint.java:278)

    at flex.messaging.MessageBrokerServlet.service(Messag eBrokerServlet.java:322)

    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)

    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)

    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)

    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)

    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286)

    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:845)

    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)

    at java.lang.Thread.run(Thread.java:619)



    ** END NESTED EXCEPTION **



    Last packet sent to the server was 0 ms ago.; nested exception is com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

    ** BEGIN NESTED EXCEPTION **

    java.net.SocketException
    MESSAGE: Software caused connection abort: recv failed

    STACKTRACE:

    java.net.SocketException: Software caused connection abort: recv failed

    at java.net.SocketInputStream.socketRead0(Native Method)

    at java.net.SocketInputStream.read(SocketInputStream. java:129)

    at com.mysql.jdbc.util.ReadAheadInputStream.fill(Read AheadInputStream.java:113)

    at com.mysql.jdbc.util.ReadAheadInputStream.readFromU nderlyingStreamIfNecessary(ReadAheadInputStream.ja va:160)

    at com.mysql.jdbc.util.ReadAheadInputStream.read(Read AheadInputStream.java:188)

    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910 )

    at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2304)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2803)

    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15 73)

    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1665)

    at com.mysql.jdbc.Connection.execSQL(Connection.java: 3170)

    at com.mysql.jdbc.Connection.execSQL(Connection.java: 3099)

    at com.mysql.jdbc.Statement.executeQuery(Statement.ja va:1169)

    at com.mchange.v2.c3p0.impl.NewProxyStatement.execute Query(NewProxyStatement.java:35)

    at org.springframework.jdbc.core.JdbcTemplate$1QueryS tatementCallback.doInStatement(JdbcTemplate.java:4 43)

    at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:396)

    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:458)

    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:466)

    at org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:187)

    at com.seventicks.correlate.dao.jdbc.CompanyJDBCImpl. getAllCompanys(CompanyJDBCImpl.java:163)

    at com.seventicks.correlate.service.impl.DefaultCompa nyService.getAllCompanys(DefaultCompanyService.jav a:45)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at flex.messaging.services.remoting.adapters.JavaAdap ter.invoke(JavaAdapter.java:421)

    at flex.messaging.services.RemotingService.serviceMes sage(RemotingService.java:183)

    at flex.messaging.MessageBroker.routeMessageToService (MessageBroker.java:1503)

    at flex.messaging.endpoints.AbstractEndpoint.serviceM essage(AbstractEndpoint.java:884)

    at flex.messaging.endpoints.amf.MessageBrokerFilter.i nvoke(MessageBrokerFilter.java:121)

    at flex.messaging.endpoints.amf.LegacyFilter.invoke(L egacyFilter.java:158)

    at flex.messaging.endpoints.amf.SessionFilter.invoke( SessionFilter.java:44)

    at flex.messaging.endpoints.amf.BatchProcessFilter.in voke(BatchProcessFilter.java:67)

    at flex.messaging.endpoints.amf.SerializationFilter.i nvoke(SerializationFilter.java:146)

    at flex.messaging.endpoints.BaseHTTPEndpoint.service( BaseHTTPEndpoint.java:278)

    at flex.messaging.MessageBrokerServlet.service(Messag eBrokerServlet.java:322)

    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)

    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)

    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)

    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)

    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286)

    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:845)

    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)

    at java.lang.Thread.run(Thread.java:619)



    ** END NESTED EXCEPTION **



    Last packet sent to the server was 0 ms ago." faultCode="Server.Processing" faultDetail="null"]

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    If you "try again" does it work, or does the error message repeat?

    If it repeats, then it seems you are using "static" connections. Bad idea, they are timing out. Use a connection pool.

    If it succeeds when you "try again" (without restarting anything, BTW), then you are using a connection pol that does not monitor the connections and so they are still timing out. Use a better connection pool.

    Edit: Sorry for the late edit.

    Well, either a poor Connection Pool, or autoreconnect on a static connection.
    Last edited by masijade; 10-28-2009 at 08:16 AM.

  3. #3
    kminev is offline Member
    Join Date
    Oct 2009
    Posts
    14
    Rep Power
    0

    Default

    Yes when I try again by clicking on the refresh button on the browser the error is gone and everything is back to normal. So it does make sense as you suggest maybe my connection timesout :) not a java gury I am using jdbc I will check my connections

  4. #4
    kminev is offline Member
    Join Date
    Oct 2009
    Posts
    14
    Rep Power
    0

    Default

    How do I switch the connection form static to non? I have bunch of config files on my project not sure where to start?

    Thanks in advance.

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    I don't use Spring (which seems to be what you're using) so I can't really tell you how to configure that. Maybe someone else here can, but I would suggest going to a Spring specific site and asking there, or at the very least, the JSP/Servlet forum here. And, if you go to the forum here, include a link to this thread in your new thread.

  6. #6
    kminev is offline Member
    Join Date
    Oct 2009
    Posts
    14
    Rep Power
    0

    Default

    I will do that: post in the forum here and find a spring specific forum to ask my questions as well.

    Thank you.

    Anybody else on this subject, how to change my connections in Spring from static to non so it will not time out on me?

    Thanks in advance

Similar Threads

  1. segmentation fault error
    By Mrs. Deswal in forum Networking
    Replies: 0
    Last Post: 08-27-2009, 08:44 AM
  2. Replies: 1
    Last Post: 10-20-2008, 08:35 AM
  3. 'Incompatible operand' fault
    By fatnic388 in forum New To Java
    Replies: 3
    Last Post: 12-01-2007, 08:05 PM
  4. What are Custom Scopes in SpringFramework
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-28-2007, 01:48 PM
  5. Replies: 1
    Last Post: 06-06-2007, 04:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •