Could not resolve type alias 'DepartmentResultMap'.
来源:互联网 发布:.net和vb是什么意思 编辑:程序博客网 时间:2024/06/07 04:24
异常信息:
org.springframework.web.servlet.DispatcherServlet 2016-05-19 16:24:13,359 http-apr-8080-exec-5 -- ERROR -- Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'DepartmentResultMap'. Cause: java.lang.ClassNotFoundException: Cannot find class: DepartmentResultMapat org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:651)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1282)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1195)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:866)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722)
xml文件:
<select id="findDepartmentList" resultType="DepartmentResultMap">
SELECT * FROM t_department
</select>
解决:将resultType改为resultMap,再重启tomcat。
0 0
- Could not resolve type alias 'DepartmentResultMap'.
- Could not resolve type alias ''
- Could not resolve type alias ''.
- Could not resolve type alias 'TableFancy'.
- org.apache.ibatis.type.TypeException: Could not resolve type alias
- Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'BaseResultMap'
- org.apache.ibatis.type.TypeException: Could not resolve type alias异常
- Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'BaseResultMap‘
- 【笔记】org.apache.ibatis.type.TypeException: Could not resolve type alias 'tableMapToModel'.
- org.apache.ibatis.type.TypeException: Could not resolve type alias 'VARCHAR'.
- Mybatis使用之 Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias‘User’
- Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Student'
- Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Types'
- Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'BaseResultMap'
- Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'BaseResultMap'
- org.apache.ibatis.type.TypeException: Could not resolve type alias 'id'.
- Mybatis resultMap启动时报错:Could not resolve type alias 'empno Cannot find class: empno
- Could not resolve type alias 微服务启动时的报错
- 【多线程-Abort()方法强制退出线程】
- win下部署solr4.7.2
- WebSphere MQ简单的命令行操作
- linux内核启动第二阶段分析
- U盘中毒文件都不见了
- Could not resolve type alias 'DepartmentResultMap'.
- UICollectionView使用方法
- G-CNN: an Iterative Grid Based Object Detector
- JAVA jdk 线程池学习笔记
- SHELL跳出循环、shift左移、函数的使用和数据库自动备份脚本
- [Book Note] Haskell: Monad
- JAVA:借用OpenOffice将上传的Word文档转换成Html格式
- 避免使用非静态内部类,这会导致Context泄露
- GeekBand第二周 ListView(上)