Spring專案啟動報錯org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find classs分析
報錯大致資訊:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [XXXXX] for bean with name 'XXX' defined in class path resource [springmvc-config.xml]; nested exception is java.lang.ClassNotFoundException:...
可以看出來,專案啟動時找不到對應的.class檔案。
那麼為什麼沒有找到呢?個人覺得原因可以簡單歸結為兩點:
1.對應的檔案沒有編譯出來;
2.配置檔案路徑有誤。
解決辦法:
1.首先在對應路徑下找,看看有沒有這個class檔案,注意仔細對照檢視路徑是否正確(包括單詞拼寫,這個坑我曾踩過o(╥﹏╥)o),如果檔案存在且拼寫無誤,請檢查配置檔案。
2.如果第一步中找不到對應的class檔案,那就應該檢查為什麼沒有編譯出.class檔案
相關推薦
Spring專案啟動報錯org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find classs分析
報錯大致資訊:org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [XXXXX] for bean with name 'XXX' defined in class
javaweb專案報錯org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [XXX]
最近在webService服務,在CXF方面自己寫了一個測試的小服務程式,釋出到本地主機上邊,程式大致框架是通過spring框架對資料庫進行連線從而操作資料庫,有一個介面,一個實現類,一個實體類,介面上邊有WebSerivce註解,實現類通過在cxf.xml檔案
spring中會報錯org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘address’ defined in class path resource [spring-spel.xml]: Initialization of bean failed 警告: Except
配置springmvc時啟動服務報錯org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ma
問題描述:前幾天啟動的時候還正常,今天改動了一下pom.xml檔案中的jar包版本就包上面的錯,結果上spring-mvc.xml的檔案中也連線不到這個類。 Caused by: org.springframework.beans.factory.NoSuchBeanDef
報錯 org.springframework.beans.factory.NoSuchBeanDefinitionException 的解決辦法
嚴重: Context initialization failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController':
報錯org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [bean
報這種錯的原因基本上是applicationContext.xml檔案中bean配置錯誤,錯誤如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory'
SSM整合報錯org.springframework.beans.factory.UnsatisfiedDependencyException
我解決的辦法是把.m2倉庫所有檔案刪除,重新maven project就可以了。 但是在做這一步之前,報錯如下: ①org.springframework.beans.factory.UnsatisfiedDependencyException ②ContainerBase.addChild
service層實現類serviceImpl單元測試,報錯org.springframework.beans.factory.UnsatisfiedDependencyException,報代理錯誤
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.microboy.demo.service.Impl.AreaServic
springmvc報錯“org.springframework.beans.factory.BeanCreationException: Error creating bean with name”
報錯資訊:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.me
報錯org.springframework.beans.factory.BeanCreationException:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlsession’ defined in class path resource [applicationCon
檔案上傳時報如下錯誤springmvc上傳檔案報錯org.springframework.beans.BeanInstantiationException
在用springmvc+mybatis進行專案開發時,上傳檔案拋異常.. org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web
整合Spring和Struts時org.springframework.beans.factory.CannotLoadBeanClassException解決辦法
在整合Spring和Struts時碰到了這個警告: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.test.service.impl.MyS
Spring中配置AOP出現org.springframework.beans.factory.BeanCreationException異常
具體異常: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a_studentDao' defined in class path resourc
org.springframework.beans.factory.CannotLoadBeanClassException
iba frame load .com 應用 java ria 全限定名 ram run java項目的時候一直報以上錯誤,原來是因為copy 全限定名的方式錯誤。 第一中方式:選中java工程中的java文件,右鍵->copy Qualified name.
啟動項目報錯:org.springframework.beans.factory.UnsatisfiedDependencyException
ini ali 監聽 exp date ram factor 接口 xml文件 dubbo項目: 啟動項目報錯:(web端) org.springframework.beans.factory.UnsatisfiedDependencyException: Error cr
部署Spring AOP報錯:org.springframework.beans.factory.BeanCreationException解決方法
在部署Spring AOP時出現如下錯誤: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminbean' defined in class path
maven專案啟動報錯:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
maven專案部署到tomcat時報錯:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 檢查了maven的pom.xml,依賴引入正常。在工程
maven專案 啟動報錯:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
tomcat在釋出專案的時候沒有同時釋出maven依賴所新增的jar包,所以找不到解決方法:設定一下eclipse:專案 —> properties -> Deployment Assembly -> Add -> Java Build Path E
springboot啟動報錯: java.lang.ClassNotFoundException: org.springframework.beans.factory.ObjectProvider
使用springboot時遇到報錯,報錯資訊如下 java.lang.IllegalStateException: Cannot load configuration class: org.mybatis.spring.boot.autoconfigure.MybatisA
Spring報錯:org/springframework/core/ResolvableTypeProvider
.class cep not ng- 沖突 pri ati AI AS Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/ResolvableTypePro