org.springframework.beans.factory.BeanCreationException

Error creating bean with name ‘sqlSessionFactory’ defined in file [D:\apache-tomcat-8.0.22\webapps\xinghe-platform-web\WEB-INF\classes\spring\applicationContext-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘URL [jar:file:/D:/apache-tomcat-8.0.22/webapps/xinghe-platform-web/WEB-INF/lib/xinghe-base-0.0.1-SNAPSHOT.jar!/com/xinghe/edu/auth/model/mapper/AuthChildrenGroupMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 39; 文档根元素 “mapper” 必须匹配 DOCTYPE 根 “configuration”。


Solutions on the web19785

Solution icon of web
Error creating bean with namesqlSessionFactorydefined in file [D:\apache-tomcat-8.0.22\webapps\xinghe-platform-web\WEB-INF\classes\spring\applicationContext-dao.xml]: Invocation of init method failed; nested exception is

Solution icon of github
Error creating bean with name 'sqlSessionFactory' defined in file [D:\Software\apache-tomcat-8.0.36\webapps\joker\WEB-INF\classes\config\spring\applicationContext-dao.xml]: Invocation of init method failed; nested exception is

Solution icon of web
Error creating bean with name 'familyDao' defined in file [D:\apache-tomcat-7.0.57\webapps\soscloud-usercenter-1.0.0\WEB-INF\classes\com\sunray\soscloud\usercenter\dao\impl\FamilyDaoImpl.class]: Initialization of bean failed; nested exception is

Solution icon of web
Error creating bean with name 'userMapper' defined in file [D:\tomcat\webapps\ktyh\WEB-INF\classes\com\hyh\mapper\UserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.NullPointerException

Solution icon of stackoverflow
Error creating bean with name 'sqlSessionFactory' defined in class path resource [META-INF/spring/data-source-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping

Solution icon of stackoverflow
Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/config/mybatis/mybatis-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse

Solution icon of web
Error creating bean with name 'sqlSessionFactory' defined in file [D:\Tomcat7\webapps\xiaomifeng\WEB-INF\classes\spring\applicationContext-ibatis3-dao.xml]: Invocation of init method failed; nested exception is

Solution icon of web
Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/classes/com/cobble/config/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException

Solution icon of web
Error creating bean with name 'oldsqlSessionFactory' defined in class path resource [resources/datasouce/datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping

Solution icon of stackoverflow
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

Stack trace

  • org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in file [D:\apache-tomcat-8.0.22\webapps\xinghe-platform-web\WEB-INF\classes\spring\applicationContext-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘URL [jar:file:/D:/apache-tomcat-8.0.22/webapps/xinghe-platform-web/WEB-INF/lib/xinghe-base-0.0.1-SNAPSHOT.jar!/com/xinghe/edu/auth/model/mapper/AuthChildrenGroupMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 39; 文档根元素 “mapper” 必须匹配 DOCTYPE 根 “configuration”。 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactoryStartChild.call(ContainerBase.java:1409) at org.apache.catalina.core.ContainerBaseWorker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘URL [jar:file:/D:/apache-tomcat-8.0.22/webapps/xinghe-platform-web/WEB-INF/lib/xinghe-base-0.0.1-SNAPSHOT.jar!/com/xinghe/edu/auth/model/mapper/AuthChildrenGroupMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 39; 文档根元素 “mapper” 必须匹配 DOCTYPE 根 “configuration”。 at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:468) at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:343) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.