jetty启动一直输出日志,无法成功启动的办法

2014-07-08 16:15:09.494 DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Ignoring bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException:
 Error creating bean with name 'wxPaymentProRightsMapper' defined in URL [jar:file:/D:/Maven_Repository/aviva-cofco/repository/com/minshenglife/wxpp/minshenglife-wxpp-dal/0.0.1-SNAPSHOT/minshenglife-wxpp-dal-0.0.1-SNAPSHOT.jar!/com/minshenglife/wxpp/dal/mapper/WxPaymentProRightsMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in URL [file:/D:/javaee/workspace/minshenglife-wxpp/minshenglife-wxpp-web/target/classes/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [mybatis/UserActivityMapper.xml]'; nested exception is java.lang.RuntimeException:
 Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.minshenglife.wxpp.dal.mapper.UserActivityMapper.searchByUserIdAndActivityId; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'sqlSessionFactory' defined in URL [file:/D:/javaee/workspace/minshenglife-wxpp/minshenglife-wxpp-web/target/classes/spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [mybatis/UserActivityMapper.xml]'; nested exception is java.lang.RuntimeException:
 Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.minshenglife.wxpp.dal.mapper.UserActivityMapper.searchByUserIdAndActivityId


先说下框架,springmvc+mybatis,用jetty启动项目的时候,jetty一直在输出debug日志,但是启动不了,也没见到报错,找了半天也不知道什么问题,就是一直在那输出debug信息,关掉jetty,仔细查看控制台输出的时候,发现了以上错误信息,并不是没有报错,是报错了,但是jetty陷入了死循环,一直在输出日志,原来是mybatis的映射文件mapper.xml出错了,里面有一段重复的映射(本来想添加一个方法复制的,但是又没有添加,也没把刚复制的删掉)最后导致这个问题的发生,引以为戒



你可能感兴趣的:(jetty)