The following error shows the missing resultmap in the mybatis configuration file XXXX. xml:
Severe: servlet. service () for servlet [springmvc] in context with path [/zhdm] threw exception [request processing failed; Nested exception is Org. mybatis. spring. mybatissystemexception: Nested exception is org.apache.ibatis.exe cutor. executorexception: A query was run and no result maps were found for the mapped statement 'com. zhdm. dao. igroupchatmsgvdao. selectunreadmsg '. it's likely that neither a result type nor a result map was specified.] with root causeorg.apache.ibatis.exe cutor. executorexception: A query was run and no result maps were found for the mapped statement 'com. zhdm. dao. igroupchatmsgvdao. selectunreadmsg '. it's likely that neither a result type nor a result map was specified. at org.apache.ibatis.exe cutor. resultset. defaultresultsethandler. validateresultmapscount (defaultresultsethandler. java: 224) at org.apache.ibatis.exe cutor. resultset. defaultresultsethandler. handleresultsets (defaultresultsethandler. java: 147) at org.apache.ibatis.exe cutor. statement. preparedstatementhandler. query (preparedstatementhandler. java: 60) at org.apache.ibatis.exe cutor. statement. routingstatementhandler. query (routingstatementhandler. java: 73) at org.apache.ibatis.exe cutor. simpleexecutor. doquery (simpleexecutor. java: 60) at org.apache.ibatis.exe cutor. baseexecutor. queryfromdatabase (baseexecutor. java: 267) at org.apache.ibatis.exe cutor. baseexecutor. query (baseexecutor. java: 137) at org.apache.ibatis.exe cutor. cachingexecutor. query (cachingexecutor. java: 96) at org.apache.ibatis.exe cutor. cachingexecutor. query (cachingexecutor. java: 77) at Org. apache. ibatis. session. defaults. defasqlsqlsession. selectlist (defasqlsqlsession. java: 108) at Org. apache. ibatis. session. defaults. defasqlsqlsession. selectlist (defasqlsqlsession. java: 102) 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: 606) at Org. mybatis. spring. sqlsessiontemplate $ sqlsessioninterceptor. invoke (sqlsessiontemplate. java: 358) at com. sun. proxy. $ proxy13.selectlist (unknown source) at Org. mybatis. spring. sqlsessiontemplate. selectlist (sqlsessiontemplate. java: 198) at org.apache.ibatis.binding.mappermethod.exe cuteformany (mappermethod. java: 119) at org.apache.ibatis.binding.mappermethod.exe cute (mappermethod. java: 63) at Org. apache. ibatis. binding. mapperproxy. invoke (mapperproxy. java: 52) at com. sun. proxy. $ proxy50.selectunreadmsg (unknown source) at com. zhdm. service. impl. groupchatserviceimpl. findunreadymsg (groupchatserviceimpl. java: 21) at com. zhdm. controller. groupchatcontroller. getunreadmsg (groupchatcontroller. java: 23) 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: 606) at Org. springframework. web. method. support. invocablehandlermethod. invoke (invocablehandlermethod. java: 215) 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: 749) at Org. springframework. web. servlet. MVC. method. annotation. requestmappinghandleradapter. handleinternal (requestmappinghandleradapter. java: 690) at Org. springframework. web. servlet. MVC. method. abstracthandlermethodadapter. handle (abstracthandlermethodadapter. java: 83) at Org. springframework. web. servlet. dispatcherservlet. dodispatch (dispatcherservlet. java: 945) at Org. springframework. web. servlet. dispatcherservlet. doservice (dispatcherservlet. java: 876) at Org. springframework. web. servlet. frameworkservlet. processrequest (frameworkservlet. java: 961) at Org. springframework. web. servlet. frameworkservlet. doget (frameworkservlet. java: 852) at javax. servlet. HTTP. httpservlet. service (httpservlet. java: 618) at Org. springframework. web. servlet. frameworkservlet. service (frameworkservlet. java: 837) at javax. servlet. HTTP. httpservlet. service (httpservlet. java: 725) at Org. apache. catalina. core. applicationfilterchain. internaldofilter (applicationfilterchain. java: 301) at Org. apache. catalina. core. applicationfilterchain. dofilter (applicationfilterchain. java: 206) at Org. apache. tomcat. websocket. server. wsfilter. dofilter (wsfilter. java: 52) at Org. apache. catalina. core. applicationfilterchain. internaldofilter (applicationfilterchain. java: 239) at Org. apache. catalina. core. applicationfilterchain. dofilter (applicationfilterchain. java: 206) at Org. springframework. web. filter. characterencodingfilter. dofilterinternal (characterencodingfilter. java: 88) at Org. springframework. web. filter. onceperrequestfilter. dofilter (onceperrequestfilter. java: 108) at Org. apache. catalina. core. applicationfilterchain. internaldofilter (applicationfilterchain. java: 239) at Org. apache. catalina. core. applicationfilterchain. dofilter (applicationfilterchain. java: 206) at Org. apache. catalina. core. standardwrappervalve. invoke (standardwrappervalve. java: 219) at Org. apache. catalina. core. standardcontextvalve. invoke (standardcontextvalve. java: 106) at Org. apache. catalina. authenticator. authenticatorbase. invoke (authenticatorbase. java: 503) at Org. apache. catalina. core. standardhostvalve. invoke (standardhostvalve. java: 136) at Org. apache. catalina. valves. errorreportvalve. invoke (errorreportvalve. java: 74) at Org. apache. catalina. valves. abstractaccesslogvalve. invoke (abstractaccesslogvalve. java: 610) at Org. apache. catalina. core. standardenginevalve. invoke (standardenginevalve. java: 88) at Org. apache. catalina. connector. coyoteadapter. service (coyoteadapter. java: 516) at Org. apache. coyote. http11.20.acthttp11processor. process (abstracthttp11processor. java: 1015) at Org. apache. coyote. abstractprotocol $ abstractconnectionhandler. process (abstractprotocol. java: 652) at Org. apache. coyote. http11.http11aprprotocol $ http11connectionhandler. process (http11aprprotocol. java: 277) at org.apache.tomcat.util.net. aprendpoint $ socketprocessor. dorun (aprendpoint. java: 2451) at org.apache.tomcat.util.net. aprendpoint $ socketprocessor. run (aprendpoint. java: 2440) 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: 744)
The correct syntax is as follows:
<select id="selectUnReadMsg" resultMap="BaseResultMap" > select * from table where </select>