Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-929

SchedulerJobRunnerReadServiceImpl.retrieveOne() IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 2

    XMLWordPrintableJSON

Details

    Description

      While working on FINERACT-922 (re. unstable Job Scheduler related tests) I once locally ran into the following error which seemed worth recording here as a bug, just in case this is later ever seen in production as well by anyone:

      11:33:37.229 [http-bio-8443-exec-1] ERROR o.s.b.w.s.support.ErrorPageFilter - Forwarding to error page from request [/api/v1/jobs/11] due to exception [Incorrect result size: expected 1, actual 2]
      org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 2
              at org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java:100)
              at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:791)
              at org.apache.fineract.infrastructure.jobs.service.SchedulerJobRunnerReadServiceImpl.retrieveOne(SchedulerJobRunnerReadServiceImpl.java:69)
              at org.apache.fineract.infrastructure.jobs.api.SchedulerJobApiResource.retrieveOne(SchedulerJobApiResource.java:113)
              at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
              at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
              at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
              at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
              at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
              at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
              at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

      I guess in an ideal world something like this should never be possible.

      Probably adding a new UNIQUE constraint in SQL DDL re. this would be useful.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: