org.apache.catalina.core.StandardContext.startInternal 一個或多個listeners啟動失敗,更多詳細信息查看對應的容器日志文件之 "Annotation-specified bean name 'deadFeeSettlementDao' for bean class [com.bessky.pss.portal.business.product.dao.impl.DeadFeeSettlementDaoImpl] conflicts with existing, non-compatible bean definition of same name and class [com.bessky.pss.portal.business.bill.dao.impl.DeadFeeSettlementDaoImpl]"
控制台報錯
02-Mar-2021 11:24:35.820 嚴重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal 一個或多個listeners啟動失敗,更多詳細信息查看對應的容器日志文件
02-Mar-2021 11:24:35.820 嚴重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal 由於之前的錯誤,Context[/bessky_pss]啟動失敗

報錯信息

原因1:說明這個類有重復的了
錯誤提示
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'deadFeeSettlementDao' for bean class [com.bessky.pss.portal.business.product.dao.impl.DeadFeeSettlementDaoImpl] conflicts with existing, non-compatible bean definition of same name and class [com.bessky.pss.portal.business.bill.dao.impl.DeadFeeSettlementDaoImpl]


解決方案1:
這時候就要去找相關的類,看下是否有自己命名未提交svn的類,有的話刪除即可,因為別人已經提交了相關的類,而這個類是新建的所以拉去下來后導包會出現問題
2021-9-15解決方案2:
重新構建項目--》原因是因為項目遷移,但在更新maven的時候target文件沒有更新--》導致了重復類--》也可以對target文件進行操作(但還是推薦重構項目)

原因2:今天又遇到這個報錯了
不過沒有看到以上的錯誤
解決方案2
我從更新了下代碼,然后清理了下Maven垃圾,在更新了下Maven的依賴,系統就可以正常啟動了

原因3:2021.6.6 又遇到了新的一種
錯誤提示
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/D:/demo/1.0/bessky_pss/bessky_pss_web/target/bessky_pss_web-0.0.1-SNAPSHOT/WEB-INF/lib/bessky_pss_web-0.0.1-SNAPSHOT.jar!/spring/portal.consumer.dubbo.xml]; nested exception is java.lang.IllegalStateException: Duplicate spring bean id synchRpcService
初步判定: 是jar包導入的某些bean添加重復
解決方案
:先檢查是否有重復的bean,然后clean和install下,重新加載jar包

臨時解決方案
介紹解決方法無效: 可以到lib文件中將重復的jar給直接刪除掉,在重啟項目,應該就可以跨越這個問題直接重啟起來
解決方案
我重裝了下tomcat就好了(具體原因不詳)
原因4:2021.7.26又遇到了新的一種
錯誤提示
這次是將Dao對應的xml關鍵字寫錯了,或者說讓其xml有了兩個相同的關鍵字
解決方案
將XML的關鍵字改為唯一的存在,並且對應Dao中的關鍵字
總結:
這個問題的方向太多了,只能慢慢去摸索和嘗試,看控制台信息,可能會一下不理解,查百度或換幾種思維來看待這個報錯
