將SVN中的類重新命名導致
阿新 • • 發佈:2019-01-03
[ERROR] 2018-05-22 19:49:14,863 org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [applicationContext-crm.xml]
Offending resource: URL [file:/F:/guotai/crmweb/out/artifacts/crmweb_war_exploded/WEB-INF/classes/applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [file:/F:/guotai/crmweb/out/artifacts/crmweb_war_exploded/WEB-INF/classes/applicationContext-crm.xml]; nested exception is java.lang.IllegalStateException: Annotation-specified bean name 'jdbcBaseDAO' for bean class [com.yuchengtech.crm.common.jdbc.JDBCBaseDAO_old] conflicts with existing, non-compatible bean definition of same name and class [com.yuchengtech.crm.common.jdbc.JDBCBaseDAO]
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:218)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [applicationContext-crm.xml]
Offending resource: URL [file:/F:/guotai/crmweb/out/artifacts/crmweb_war_exploded/WEB-INF/classes/applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [file:/F:/guotai/crmweb/out/artifacts/crmweb_war_exploded/WEB-INF/classes/applicationContext-crm.xml]; nested exception is java.lang.IllegalStateException: Annotation-specified bean name 'jdbcBaseDAO' for bean class [com.yuchengtech.crm.common.jdbc.JDBCBaseDAO_old] conflicts with existing, non-compatible bean definition of same name and class [com.yuchengtech.crm.common.jdbc.JDBCBaseDAO]
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:218)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
解決方法:通過本地歷史,將版本改為未出現問題前,在檔案如java類內部改,不再改該類的名