Michael Vorburger created FINERACT-929:
------------------------------------------

             Summary: SchedulerJobRunnerReadServiceImpl.retrieveOne() 
IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, 
actual 2
                 Key: FINERACT-929
                 URL: https://issues.apache.org/jira/browse/FINERACT-929
             Project: Apache Fineract
          Issue Type: Bug
            Reporter: Michael Vorburger


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:

{noformat}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){noformat}

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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to