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出錯了,裏面有一段重複的映射(本來想添加一個方法複製的,但是又沒有添加,也沒把剛複製的刪掉)最後導致這個問題的發生,引以爲戒
發佈了77 篇原創文章 · 獲贊 0 · 訪問量 5549
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章