Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for & hellip;, querying

Source: Internet
Author: User

Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value ..., Querying

After compiling and running the web successfully, you do not need to connect to the database on the accessed page. If you do not call the object class through reflection, no error is reported,

The error message is as follows:

[WARNING]
Org. springframework. web. util. NestedServletException: Request processing failed; nested exception is org. mybatis. spring. MyBatisSystemException: nested exception is org. apache. ibatis. exceptions. PersistenceException:
### Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
### Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. springframework. web. servlet. FrameworkServlet. processRequest (FrameworkServlet. java: 978)
At org. springframework. web. servlet. FrameworkServlet. doPost (FrameworkServlet. java: 868)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 755)
At org. springframework. web. servlet. FrameworkServlet. service (FrameworkServlet. java: 842)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 848)
At org. eclipse. jetty. servlet. ServletHolder. handle (ServletHolder. java: 684)
At org. eclipse. jetty. servlet. ServletHandler $ CachedChain. doFilter (ServletHandler. java: 1496)
At org. springframework. web. filter. CharacterEncodingFilter. doFilterInternal (CharacterEncodingFilter. java: 85)
At org. springframework. web. filter. OncePerRequestFilter. doFilter (OncePerRequestFilter. java: 107)
At org. eclipse. jetty. servlet. ServletHandler $ CachedChain. doFilter (ServletHandler. java: 1476)
At org. eclipse. jetty. servlet. ServletHandler. doHandle (ServletHandler. java: 501)
At org. eclipse. jetty. server. handler. ScopedHandler. handle (ScopedHandler. java: 137)
At org. eclipse. jetty. security. SecurityHandler. handle (SecurityHandler. java: 557)
At org. eclipse. jetty. server. session. SessionHandler. doHandle (SessionHandler. java: 231)
At org. eclipse. jetty. server. handler. ContextHandler. doHandle (ContextHandler. java: 1086)
At org. eclipse. jetty. servlet. ServletHandler. doScope (ServletHandler. java: 429)
At org. eclipse. jetty. server. session. SessionHandler. doScope (SessionHandler. java: 193)
At org. eclipse. jetty. server. handler. ContextHandler. doScope (ContextHandler. java: 1020)
At org. eclipse. jetty. server. handler. ScopedHandler. handle (ScopedHandler. java: 135)
At org. eclipse. jetty. server. handler. ContextHandlerCollection. handle (ContextHandlerCollection. java: 255)
At org. eclipse. jetty. server. handler. HandlerCollection. handle (HandlerCollection. java: 154)
At org. eclipse. jetty. server. handler. HandlerWrapper. handle (HandlerWrapper. java: 116)
At org. eclipse. jetty. server. Server. handle (servers. java: 370)
At org. eclipse. jetty. server. AbstractHttpConnection. handleRequest (AbstractHttpConnection. java: 494)
At org. eclipse. jetty. server. AbstractHttpConnection. content (AbstractHttpConnection. java: 982)
At org. eclipse. jetty. server. AbstractHttpConnection $ RequestHandler. content (AbstractHttpConnection. java: 1043)
At org. eclipse. jetty. http. HttpParser. parseNext (HttpParser. java: 865)
At org. eclipse. jetty. http. HttpParser. parseAvailable (HttpParser. java: 240)
At org. eclipse. jetty. server. AsyncHttpConnection. handle (AsyncHttpConnection. java: 82)
At org. eclipse. jetty. io. nio. SelectChannelEndPoint. handle (SelectChannelEndPoint. java: 696)
At org. eclipse. jetty. io. nio. SelectChannelEndPoint $ 1.run( SelectChannelEndPoint. java: 53)
At org. eclipse. jetty. util. thread. QueuedThreadPool. runJob (QueuedThreadPool. java: 608)
At org. eclipse. jetty. util. thread. QueuedThreadPool $ 3.run( QueuedThreadPool. java: 543)
At java. lang. Thread. run (Thread. java: 745)
Caused by: org. mybatis. spring. MyBatisSystemException: nested exception is org. apache. ibatis. exceptions. PersistenceException:
### Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
### Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. mybatis. spring. MyBatisExceptionTranslator. translateExceptionIfPossible (MyBatisExceptionTranslator. java: 73)
At org. mybatis. spring. SqlSessionTemplate $ SqlSessionInterceptor. invoke (SqlSessionTemplate. java: 365)
At com. sun. proxy. $ Proxy35.selectList (Unknown Source)
At org. mybatis. spring. SqlSessionTemplate. selectList (SqlSessionTemplate. java: 195)
At com. erp. comm. datasource. dao. DataSourceSupport. selectList (DataSourceSupport. java: 32)
At com. erp. comm. datasource. dao. TableMapper. selectFirstByExample (TableMapper. java: 31)
At com. erp. sys. service. impl. LoginServiceImpl. getLoginUserBeanByLoginName (LoginServiceImpl. java: 25)
At com. erp. sys. controller. LoginController. loginin (LoginController. java: 56)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43)
At java. lang. reflect. Method. invoke (Method. java: 497)
At org. springframework. web. method. support. InvocableHandlerMethod. doInvoke (InvocableHandlerMethod. java: 221)
At org. springframework. web. method. support. InvocableHandlerMethod. invokeForRequest (InvocableHandlerMethod. java: 137)
At org. springframework. web. servlet. mvc. method. annotation. ServletInvocableHandlerMethod. invokeAndHandle (ServletInvocableHandlerMethod. java: 110)
At org. springframework. web. servlet. mvc. method. annotation. RequestMappingHandlerAdapter. invokeHandleMethod (RequestMappingHandlerAdapter. java: 776)
At org. springframework. web. servlet. mvc. method. annotation. RequestMappingHandlerAdapter. handleInternal (RequestMappingHandlerAdapter. java: 705)
At org. springframework. web. servlet. mvc. method. AbstractHandlerMethodAdapter. handle (AbstractHandlerMethodAdapter. java: 85)
At org. springframework. web. servlet. DispatcherServlet. doDispatch (DispatcherServlet. java: 959)
At org. springframework. web. servlet. DispatcherServlet. doService (DispatcherServlet. java: 893)
At org. springframework. web. servlet. FrameworkServlet. processRequest (FrameworkServlet. java: 966)
... 33 more
Caused by: org. apache. ibatis. exceptions. PersistenceException:
### Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
### Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. apache. ibatis. exceptions. ExceptionFactory. wrapException (ExceptionFactory. java: 26)
At org. apache. ibatis. session. defaults. DefaultSqlSession. selectList (DefaultSqlSession. java: 111)
At org. apache. ibatis. session. defaults. DefaultSqlSession. selectList (DefaultSqlSession. java: 102)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43)
At java. lang. reflect. Method. invoke (Method. java: 497)
At org. mybatis. spring. SqlSessionTemplate $ SqlSessionInterceptor. invoke (SqlSessionTemplate. java: 355)
... 52 more
Caused by: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. apache. ibatis. session. Configuration $ StrictMap. get (Configuration. java: 797)
At org. apache. ibatis. session. Configuration. getMappedStatement (Configuration. java: 631)
At org. apache. ibatis. session. Configuration. getMappedStatement (Configuration. java: 624)
At org. apache. ibatis. session. defaults. DefaultSqlSession. selectList (DefaultSqlSession. java: 107)
... 58 more
[WARNING]/erp-sys-web/loginin
Org. mybatis. spring. MyBatisSystemException: nested exception is org. apache. ibatis. exceptions. PersistenceException:
### Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
### Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. mybatis. spring. MyBatisExceptionTranslator. translateExceptionIfPossible (MyBatisExceptionTranslator. java: 73)
At org. mybatis. spring. SqlSessionTemplate $ SqlSessionInterceptor. invoke (SqlSessionTemplate. java: 365)
At com. sun. proxy. $ Proxy35.selectList (Unknown Source)
At org. mybatis. spring. SqlSessionTemplate. selectList (SqlSessionTemplate. java: 195)
At com. erp. comm. datasource. dao. DataSourceSupport. selectList (DataSourceSupport. java: 32)
At com. erp. comm. datasource. dao. TableMapper. selectFirstByExample (TableMapper. java: 31)
At com. erp. sys. service. impl. LoginServiceImpl. getLoginUserBeanByLoginName (LoginServiceImpl. java: 25)
At com. erp. sys. controller. LoginController. loginin (LoginController. java: 56)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43)
At java. lang. reflect. Method. invoke (Method. java: 497)
At org. springframework. web. method. support. InvocableHandlerMethod. doInvoke (InvocableHandlerMethod. java: 221)
At org. springframework. web. method. support. InvocableHandlerMethod. invokeForRequest (InvocableHandlerMethod. java: 137)
At org. springframework. web. servlet. mvc. method. annotation. ServletInvocableHandlerMethod. invokeAndHandle (ServletInvocableHandlerMethod. java: 110)
At org. springframework. web. servlet. mvc. method. annotation. RequestMappingHandlerAdapter. invokeHandleMethod (RequestMappingHandlerAdapter. java: 776)
At org. springframework. web. servlet. mvc. method. annotation. RequestMappingHandlerAdapter. handleInternal (RequestMappingHandlerAdapter. java: 705)
At org. springframework. web. servlet. mvc. method. AbstractHandlerMethodAdapter. handle (AbstractHandlerMethodAdapter. java: 85)
At org. springframework. web. servlet. DispatcherServlet. doDispatch (DispatcherServlet. java: 959)
At org. springframework. web. servlet. DispatcherServlet. doService (DispatcherServlet. java: 893)
At org. springframework. web. servlet. FrameworkServlet. processRequest (FrameworkServlet. java: 966)
At org. springframework. web. servlet. FrameworkServlet. doPost (FrameworkServlet. java: 868)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 755)
At org. springframework. web. servlet. FrameworkServlet. service (FrameworkServlet. java: 842)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 848)
At org. eclipse. jetty. servlet. ServletHolder. handle (ServletHolder. java: 684)
At org. eclipse. jetty. servlet. ServletHandler $ CachedChain. doFilter (ServletHandler. java: 1496)
At org. springframework. web. filter. CharacterEncodingFilter. doFilterInternal (CharacterEncodingFilter. java: 85)
At org. springframework. web. filter. OncePerRequestFilter. doFilter (OncePerRequestFilter. java: 107)
At org. eclipse. jetty. servlet. ServletHandler $ CachedChain. doFilter (ServletHandler. java: 1476)
At org. eclipse. jetty. servlet. ServletHandler. doHandle (ServletHandler. java: 501)
At org. eclipse. jetty. server. handler. ScopedHandler. handle (ScopedHandler. java: 137)
At org. eclipse. jetty. security. SecurityHandler. handle (SecurityHandler. java: 557)
At org. eclipse. jetty. server. session. SessionHandler. doHandle (SessionHandler. java: 231)
At org. eclipse. jetty. server. handler. ContextHandler. doHandle (ContextHandler. java: 1086)
At org. eclipse. jetty. servlet. ServletHandler. doScope (ServletHandler. java: 429)
At org. eclipse. jetty. server. session. SessionHandler. doScope (SessionHandler. java: 193)
At org. eclipse. jetty. server. handler. ContextHandler. doScope (ContextHandler. java: 1020)
At org. eclipse. jetty. server. handler. ScopedHandler. handle (ScopedHandler. java: 135)
At org. eclipse. jetty. server. handler. ContextHandlerCollection. handle (ContextHandlerCollection. java: 255)
At org. eclipse. jetty. server. handler. HandlerCollection. handle (HandlerCollection. java: 154)
At org. eclipse. jetty. server. handler. HandlerWrapper. handle (HandlerWrapper. java: 116)
At org. eclipse. jetty. server. Server. handle (servers. java: 370)
At org. eclipse. jetty. server. AbstractHttpConnection. handleRequest (AbstractHttpConnection. java: 494)
At org. eclipse. jetty. server. AbstractHttpConnection. content (AbstractHttpConnection. java: 982)
At org. eclipse. jetty. server. AbstractHttpConnection $ RequestHandler. content (AbstractHttpConnection. java: 1043)
At org. eclipse. jetty. http. HttpParser. parseNext (HttpParser. java: 865)
At org. eclipse. jetty. http. HttpParser. parseAvailable (HttpParser. java: 240)
At org. eclipse. jetty. server. AsyncHttpConnection. handle (AsyncHttpConnection. java: 82)
At org. eclipse. jetty. io. nio. SelectChannelEndPoint. handle (SelectChannelEndPoint. java: 696)
At org. eclipse. jetty. io. nio. SelectChannelEndPoint $ 1.run( SelectChannelEndPoint. java: 53)
At org. eclipse. jetty. util. thread. QueuedThreadPool. runJob (QueuedThreadPool. java: 608)
At org. eclipse. jetty. util. thread. QueuedThreadPool $ 3.run( QueuedThreadPool. java: 543)
At java. lang. Thread. run (Thread. java: 745)
Caused by: org. apache. ibatis. exceptions. PersistenceException:
### Error querying database. Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
### Cause: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. apache. ibatis. exceptions. ExceptionFactory. wrapException (ExceptionFactory. java: 26)
At org. apache. ibatis. session. defaults. DefaultSqlSession. selectList (DefaultSqlSession. java: 111)
At org. apache. ibatis. session. defaults. DefaultSqlSession. selectList (DefaultSqlSession. java: 102)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43)
At java. lang. reflect. Method. invoke (Method. java: 497)
At org. mybatis. spring. SqlSessionTemplate $ SqlSessionInterceptor. invoke (SqlSessionTemplate. java: 355)
... 52 more
Caused by: java. lang. IllegalArgumentException: Mapped Statements collection does not contain value for com. erp. sys. dao. table. mapper. SysUserPOMapper. selectByExample
At org. apache. ibatis. session. Configuration $ StrictMap. get (Configuration. java: 797)
At org. apache. ibatis. session. Configuration. getMappedStatement (Configuration. java: 631)
At org. apache. ibatis. session. Configuration. getMappedStatement (Configuration. java: 624)
At org. apache. ibatis. session. defaults. DefaultSqlSession. selectList (DefaultSqlSession. java: 107)
... 58 more

Solution:

1. Perform Maven cleanup on all related projects. Right-click the project and choose Run as> Maven clean.

2. Clean up the web Project. The Eclipse step is: Project-Clean-> Clean projects selected below, select the web Project to be cleaned up, and click OK.

3. Re-compile all related projects, right-click the project and choose Run as> Maven install

★You need to refresh the web Project (F5) before Maven install.

☆If not, refresh it once again, and refresh (F5) before Maven install for each project.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.