Invalid bound statement (not found):gov.hkpf.cis2.ws.mapper.charge.CrtCaseMapper.getArrestPersons

2014-06-06 17:23:19:082 ERROR DbQueryExceptionHandler:80 -
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): gov.hkpf.cis2.ws.mapper.charge.CrtCaseMapper.getArrestPersons
    at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:178)
    at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:38)
    at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:49)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:42)
    at com.sun.proxy.$Proxy49.getRefCrt(Unknown Source)
    at gov.hkpf.cis2.ws.policecase.service.GetRefModelListAction.getActiveRefList(GetRefModelListAction.java:87)
    at gov.hkpf.cis2.ws.policecase.service.GetRefModelListAction.getReferences(GetRefModelListAction.java:48)
    at gov.hkpf.cis2.ws.common.util.GenericReferenceQueryHandler.runImpl(GenericReferenceQueryHandler.java:33)
    at gov.hkpf.cis2.ws.common.util.GenericReferenceQueryHandler.runImpl(GenericReferenceQueryHandler.java:1)
    at gov.hkpf.cis2.ws.common.util.DbQueryExceptionHandler.run(DbQueryExceptionHandler.java:70)
    at gov.hkpf.cis2.ws.common.service.ReferenceServiceImpl.getReferenceModels(ReferenceServiceImpl.java:147)
    at gov.hkpf.cis2.ws.common.entrypoint.rest.ReferenceWebService.getReferenceModels(ReferenceWebService.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for gov.hkpf.cis2.ws.mapper.charge.CrtCaseMapper.getArrestPersons
    at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:775)
    at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:615)
    at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:608)
    at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:176)
    ... 47 more

解决办法是 在mapper底下重新写了个PersonDTOMapper.java

把方法public List<PersonDTO> getArrestPersons() throws MyBatisSystemException, DataAccessException;添加进去

重新写好PersonDTOMapper.xml文件 写好对应的sql

自己感觉是一个xml文件中resultType只能对应一个DTO,写在其他文件中就会报错,等待确认

 

Invalid bound statement (not found):gov.hkpf.cis2.ws.mapper.charge.CrtCaseMapper.getArrestPersons,,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。