这啥错误 Document root element "additionalHeaders", must match DOCTYPE root "null".

sound02 2018-06-22 02:05:32
Caused by: org.xml.sax.SAXParseException: Document root element "additionalHeaders", must match DOCTYPE root "null".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[na:1.8.0_161]
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134) ~[na:1.8.0_161]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396) ~[na:1.8.0_161]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) ~[na:1.8.0_161]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284) ~[na:1.8.0_161]
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1599) ~[na:1.8.0_161]
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1877) ~[na:1.8.0_161]
at com.sun.org.apache.
...全文
185 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
sound02 2018-06-23
  • 打赏
  • 举报
回复
引用 5 楼 QWERT4745 的回复:
有没有可能是jar包冲突?

就是包冲突
sound02 2018-06-22
  • 打赏
  • 举报
回复
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaController': Unsatisfied dependency expressed through field 'fileMetaServiceImpl'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaService': Unsatisfied dependency expressed through field 'fileMetaRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaRepository': Unsatisfied dependency expressed through field 'fileMetaMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaMapper' defined in file [D:\GitJava\nexus\nexus-repository\target\classes\com\sz\nexus\repository\dao\mapper\FileMetaMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.
sound02 2018-06-22
  • 打赏
  • 举报
回复
关键是,我用同样的多模块建立另外一个就能跑

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaController': Unsatisfied dependency expressed through field 'fileMetaServiceImpl'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaService': Unsatisfied dependency expressed through field 'fileMetaRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaRepository': Unsatisfied dependency expressed through field 'fileMetaMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fileMetaMapper' defined in file [D:\GitJava\nexus\nexus-repository\target\classes\com\sz\nexus\repository\dao\mapper\FileMetaMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.f
stacksoverflow 2018-06-22
  • 打赏
  • 举报
回复
Caused by: org.xml.sax.SAXParseException: Document root element "additionalHeaders", must match DOCTYPE root "null".

按这个提示就是xml解析错误
把全日志贴出来,看看能不能查到是哪个xml的问题?
QWERT4745 2018-06-22
  • 打赏
  • 举报
回复
有没有可能是jar包冲突?
sound02 2018-06-22
  • 打赏
  • 举报
回复
引用 3 楼 stacksoverflow 的回复:
[quote=引用 2 楼 sound02 的回复:]
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.sz.nexus.repository.dao.mapper.FileMetaMapper" >


我是用mybatis逆向工程生成的代码

这个mapper没有关掉
</mapper>[/quote]
有关掉的,
stacksoverflow 2018-06-22
  • 打赏
  • 举报
回复
引用 2 楼 sound02 的回复:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.sz.nexus.repository.dao.mapper.FileMetaMapper" >


我是用mybatis逆向工程生成的代码

这个mapper没有关掉
</mapper>
sound02 2018-06-22
  • 打赏
  • 举报
回复
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.sz.nexus.repository.dao.mapper.FileMetaMapper" >


我是用mybatis逆向工程生成的代码
stacksoverflow 2018-06-22
  • 打赏
  • 举报
回复
xml文件格式不对,下面红色的要一直,你的应该是没有DOCTYPE ,并且根节点写成了additionalHeaders

<!DOCTYPE xxx
<xxx>
</xxx>

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧