2 fnzf14428547 fnzf14428547 于 2016.03.07 13:43 提问

一个错一上午还没解决mybatis配置文件出错

这是什么问题啊。困扰我一早上了,看提示是找不到这个文件,但是路径没错啊

`SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [resource/spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\srpingquartz-demo.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Test Maven Webapp\WEB-INF\classes\com\fishoad\dao\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.fishroad.vo.User'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.fishroad.vo.User


4个回答

wojiushiwo945you
wojiushiwo945you   Ds   Rxr 2016.03.07 14:00
已采纳

建议吧这个配置文件贴出来看看。异常显示Could not resolve type alias 'com.fishroad.vo.User'.检查下这个类的全称是不是拼写正确呢?

stanshrek
stanshrek 学习了
接近 2 年之前 回复
xinmengdie01
xinmengdie01   2016.03.07 13:51

com.fishroad.vo.User 这个类不存在,是不是这个类路径写的不对

xinmengdie01
xinmengdie01   2016.03.07 13:51

com.fishroad.vo.User 这个类不存在,是不是这个类路径写的不对

wangkang80
wangkang80   2016.03.07 15:47

关于spring和mybatis的集成配置,可参考:http://git.oschina.net/wangkang/llsfw

希望能够帮到你.

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!