org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'statisticalMapper' defined in file

 1 2016-03-04 10:27:36,769 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'
 2 2016-03-04 10:27:36,776 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed configuration file: 'class path resource [config/mybatis-config.xml]'
 3 2016-03-04 10:27:36,783 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed mapper file: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\DictionaryMapper.xml]'
 4 2016-03-04 10:27:36,794 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed mapper file: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\ExceptionMapper.xml]'
 5 2016-03-04 10:27:36,801 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed mapper file: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\SolutionContentMapper.xml]'
 6 2016-03-04 10:27:36,810 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed mapper file: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\StatisticalMapper.xml]'
 7 2016-03-04 10:27:36,819 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed mapper file: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\userMapper.xml]'
 8 2016-03-04 10:27:36,821 [localhost-startStop-1] WARN  [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'statisticalMapper' defined in file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\StatisticalMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\config\spring-common.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\VCHouseMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 26; columnNumber: 114; 必须为元素类型 "insert" 声明属性 "resultType"。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\config\spring-common.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\VCHouseMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 26; columnNumber: 114; 必须为元素类型 "insert" 声明属性 "resultType"。
 9 2016-03-04 10:27:36,821 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'VCHouseMapper'
10 2016-03-04 10:27:36,821 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'VCHouseMapper'
11 2016-03-04 10:27:36,822 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'VCHouseMapper' to allow for resolving potential circular references
12 2016-03-04 10:27:36,822 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'statisticalMapper'
13 2016-03-04 10:27:36,822 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'statisticalMapper'
14 2016-03-04 10:27:36,822 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'statisticalMapper' to allow for resolving potential circular references
15 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning eagerly cached instance of singleton bean 'statisticalMapper' that is not fully initialized yet - a consequence of a circular reference
16 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning eagerly cached instance of singleton bean 'VCHouseMapper' that is not fully initialized yet - a consequence of a circular reference
17 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'sqlSessionFactory'
18 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'sqlSessionFactory'
19 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references
20 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'dataSource'
21 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.core.io.support.PathMatchingResourcePatternResolver] - Looking for matching resources in directory tree [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper]
22 2016-03-04 10:27:36,823 [localhost-startStop-1] DEBUG [org.springframework.core.io.support.PathMatchingResourcePatternResolver] - Searching directory [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper] for files matching pattern [D:/Installer_Program/apache-tomcat-7.0.67/webapps/xxxx/WEB-INF/classes/xxx/mapper/*.xml]
23 2016-03-04 10:27:36,824 [localhost-startStop-1] DEBUG [org.springframework.core.io.support.PathMatchingResourcePatternResolver] - Resolved location pattern [classpath:xxx/mapper/*.xml] to resources [file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\DictionaryMapper.xml], file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\ExceptionMapper.xml], file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\SolutionContentMapper.xml], file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\StatisticalMapper.xml], file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\userMapper.xml], file [D:\Installer_Program\apache-tomcat-7.0.67\webapps\xxxx\WEB-INF\classes\xxxxmapper\VCHouseMapper.xml]]
24 2016-03-04 10:27:36,824 [localhost-startStop-1] DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'
25 2016-03-04 10:27:36,831 [localhost-startStop-1] DEBUG [org.mybatis.spring.SqlSessionFactoryBean] - Parsed configuration file: 'class path resource [config/mybatis-config.xml]'

 这个问题一般是mapper里面的SQL语句写错了。可能是本来select,却写成了insert

posted on 2016-03-04 10:30  洛易  阅读(21556)  评论(0编辑  收藏  举报