Jetty起動ログを常に出力し、正常に起動できない方法

2392 ワード

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エラーで、中には重複したマッピング(コピー方法を追加したいと思っていたが、追加もしていないし、コピーしたばかりの削除もしていない)があり、最後にこの問題が発生したことを戒めています.