项目跑不起来,老师帮我看一下呀。

来源:3-4 IDEA如何运行导入的Web项目及ImageServer问题

y_play

2017-05-09

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'adminFunctionDAO': Unsatisfied dependency expressed through field 'template': Error creating bean with name 'sqlSessionTemplate' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'URL [jar:file:/D:/groupon02/Site/Web/target/groupon-site-web-1.0/WEB-INF/lib/groupon-service-1.0.jar!/com/tortuousroad/groupon/deal/dao/mapper/DealCategoryMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionTemplate' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'URL [jar:file:/D:/groupon02/Site/Web/target/groupon-site-web-1.0/WEB-INF/lib/groupon-service-1.0.jar!/com/tortuousroad/groupon/deal/dao/mapper/DealCategoryMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

写回答

4回答

moocer

2017-05-15

这个问题确实不多见,我在mac和windows上都试过,没遇到过这个问题,这个可能和操作系统环境有关系吧,需要看你详细的信息才能知道什么原因了

0
0

moocer

2017-05-12

不是xml文件加编码,是给maven的配置中加编码

0
1
y_play
老师,你groupon.xml里面compiler和resources都加了utf-8设置的嘛,还是会报这个错误。
2017-05-13
共1条回复

moocer

2017-05-10

这个其他同学好像也有遇到的,是文件编码的问题。

你试试在pom里加一下限制编码为utf-8.

0
1
y_play
每个pom.xml加了utf-8还是报这个错误,网上也是说编码问题,但改了还是报这种错误。
2017-05-11
共1条回复

y_play

提问者

2017-05-09

mapper/DealCategoryMapper.xml     好像说这个文件编码不对,

Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

但是,是utf-8呀,把里面注释的中文删除了还是报这个错误。请问老师知道这个情况吗??

0
0

Java Spring带前后端开发完整电商平台

工具组件封装+支付回调扩展+电商设计思想经验分享

612 学习 · 186 问题

查看课程