Announcement Announcement Module
Collapse
No announcement yet.
RecoverableDataAccessException in Spring Batch Admin Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RecoverableDataAccessException in Spring Batch Admin

    Hi,

    I successfully deployed spring batch admin to tomcat 7.0, however, I repeatedly get the below exception when accessing the url for the first time after longer pauses (e.g. over night). After restarting tomcat, it works fine again.

    Can anybody advice how to get rid of this strange behaviour?

    Thanks and br,
    Elmar

    org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.dao.RecoverableDataAccessExcep tion: StatementCallback; SQL [SELECT distinct JOB_NAME from BATCH_JOB_INSTANCE order by JOB_NAME]; No more data to read from socket; nested exception is java.sql.SQLRecoverableException: No more data to read from socket
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:656)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    org.springframework.web.filter.HiddenHttpMethodFil ter.doFilterInternal(HiddenHttpMethodFilter.java:7 7)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.web.filter.ShallowEtagHeaderFi lter.doFilterInternal(ShallowEtagHeaderFilter.java :58)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)

    root cause

    org.springframework.dao.RecoverableDataAccessExcep tion: StatementCallback; SQL [SELECT distinct JOB_NAME from BATCH_JOB_INSTANCE order by JOB_NAME]; No more data to read from socket; nested exception is java.sql.SQLRecoverableException: No more data to read from socket
    org.springframework.jdbc.support.SQLExceptionSubcl assTranslator.doTranslate(SQLExceptionSubclassTran slator.java:98)
    org.springframework.jdbc.support.AbstractFallbackS QLExceptionTranslator.translate(AbstractFallbackSQ LExceptionTranslator.java:72)
    org.springframework.jdbc.support.AbstractFallbackS QLExceptionTranslator.translate(AbstractFallbackSQ LExceptionTranslator.java:80)
    org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:406)
    org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:455)
    org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:463)
    org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:199)
    org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:205)
    org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.getJobNames(JdbcJobInstanceDao.java :294)
    org.springframework.batch.admin.service.SimpleJobS ervice.countJobs(SimpleJobService.java:255)
    org.springframework.batch.admin.web.JobController. jobs(JobController.java:201)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:601)
    org.springframework.web.bind.annotation.support.Ha ndlerMethodInvoker.invokeHandlerMethod(HandlerMeth odInvoker.java:176)
    org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.invokeHandlerMethod(An notationMethodHandlerAdapter.java:426)
    org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.handle(AnnotationMetho dHandlerAdapter.java:414)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:790)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    org.springframework.web.filter.HiddenHttpMethodFil ter.doFilterInternal(HiddenHttpMethodFilter.java:7 7)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.web.filter.ShallowEtagHeaderFi lter.doFilterInternal(ShallowEtagHeaderFilter.java :58)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)

    root cause

    java.sql.SQLRecoverableException: No more data to read from socket
    oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMA REngine.java:1157)
    oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.jav a:290)
    oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java: 192)
    oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:5 31)
    oracle.jdbc.driver.T4CStatement.doOall8(T4CStateme nt.java:193)
    oracle.jdbc.driver.T4CStatement.executeForDescribe (T4CStatement.java:873)
    oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1167)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1289)
    oracle.jdbc.driver.OracleStatement.executeQuery(Or acleStatement.java:1491)
    oracle.jdbc.driver.OracleStatementWrapper.executeQ uery(OracleStatementWrapper.java:406)
    org.apache.commons.dbcp.DelegatingStatement.execut eQuery(DelegatingStatement.java:208)
    org.springframework.jdbc.core.JdbcTemplate$1QueryS tatementCallback.doInStatement(JdbcTemplate.java:4 40)
    org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:395)
    org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:455)
    org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:463)
    org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:199)
    org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:205)
    org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.getJobNames(JdbcJobInstanceDao.java :294)
    org.springframework.batch.admin.service.SimpleJobS ervice.countJobs(SimpleJobService.java:255)
    org.springframework.batch.admin.web.JobController. jobs(JobController.java:201)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:601)
    org.springframework.web.bind.annotation.support.Ha ndlerMethodInvoker.invokeHandlerMethod(HandlerMeth odInvoker.java:176)
    org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.invokeHandlerMethod(An notationMethodHandlerAdapter.java:426)
    org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.handle(AnnotationMetho dHandlerAdapter.java:414)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:790)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    org.springframework.web.filter.HiddenHttpMethodFil ter.doFilterInternal(HiddenHttpMethodFilter.java:7 7)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.web.filter.ShallowEtagHeaderFi lter.doFilterInternal(ShallowEtagHeaderFilter.java :58)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)

  • #2
    How is your connection pool configured? I believe that error is due to the app attempting to use stale connections.

    Comment

    Working...
    X