Laughing girl2021 2022-03-27 21:30 采纳率: 100%
浏览 45
已结题

新人学SSM框架时遇到tomcat运行时出现以下错误代码,求指导


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [H:\intellij idea\empsys\target\classes\com\wyzxw\mapper\DepartMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.wyzxw.mapper.DepartMapper.BaseResultMap
327, 2022 9:28:54 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
327, 2022 9:28:54 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
327, 2022 9:28:54 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
327, 2022 9:28:55 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
327, 2022 9:28:55 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
327, 2022 9:28:55 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
327, 2022 9:28:55 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [mysql-cj-abandoned-connection-cleanup] but has failed to stop it. This is v

  • 写回答

2条回答 默认 最新

  • Tomshidi 2022-03-27 22:18
    关注

    DepartMapper.xml文件里有相同id的语句,仔细检查。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 4月6日
  • 已采纳回答 3月29日
  • 创建了问题 3月27日