1. 程式人生 > >IDEA 下spring mvc 等web 程式啟動報錯找不到類:org.springframework.web.context.ContextLoaderListener等問題

IDEA 下spring mvc 等web 程式啟動報錯找不到類:org.springframework.web.context.ContextLoaderListener等問題

當初看見這個以為自己那個地方出現了什麼毛病。所以多建立了幾個程式,卻發現一直都是啟動不了啟動失敗

22-Mar-2018 19:50:30.426 嚴重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]

 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

後面還有很多報錯資訊,但是一看就是這個問題出錯 說是找不到類 於是就先自己嘗試下能不能建立這個類的物件 於是乎:


看來不是導包失敗 那tomcat說找不到該檔案怎麼回事 仔細檢查專案結構 File->Project Structure->

進去後發現

確實在打包程式的時候確實沒有將lib裡面的jar包一起傳送到tomcat 看來是這樣 點選fix 解決問題後重啟tomcat 正常執行 

由此總結 當前在引入包 只是將該包引入到當前專案路徑下 並沒有加入到打包artifact中 若是tomcat裡面有lib包 如 serlet-jar等 不需要再次匯入到artifact 否則還需要fix下

相關推薦

IDEA spring mvc web 程式啟動org.springframework.web.context.ContextLoaderListener問題

當初看見這個以為自己那個地方出現了什麼毛病。所以多建立了幾個程式,卻發現一直都是啟動不了啟動失敗22-Mar-2018 19:50:30.426 嚴重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.Sta

項目maven update 後啟動項目出現導常org.springframework.web.context.ContextLoaderListener

add erl clean 右鍵 啟動項 pri 選擇 spring upd 導常:org.springframework.web.context.ContextLoaderListener 1. 右鍵單擊工程項目 ->點擊 properties2. 選擇 Deplo

msyql 啟動 到pid 文件

mysql 數據庫啟動 pid 文件安裝完mysql 啟動mysql 數據庫 報錯 Starting MySQL.The server quit without updating PID file (/app/mysql/mysql/data/mysqld.pid).[FAILED]Starting MyS

gulp啟動到模組

當從遠端git clone一個JHipster專案,很多檔案被.gitignore了。 執行mvn compile將後端依賴下載到本地倉庫, 執行npm install,專案目錄下出現node_modules資料夾,下載node依賴包 執行bower install,web

mysql啟動,到mysql.sock

有一次開啟網站時發現報錯了,於是到網上去找原因,大部分都說是mysql資料庫的問題,於是我就想啟動一下mysql是否會報錯,果然在啟動的報錯了。 說是找不到/tmp/mysql.sock了,我這才突然想起前些天把/tmp目錄下的檔案都給清空了,於是我又新建了一個mysql.

Jmeter啟動到KeyTool外掛

之前換電腦後安裝jmeter,啟動後有如下報錯,度娘了好多地方,最後終於解決,現將解決方法記錄如下: 2017-04-28 03:44:11,571 ERROR o.a.j.e.KeyToolUtils: Exception checking for keytool exi

第一個Spring Boot程式啟動

建立完成第一個Spring Boot專案後,準備執行,嘗一下勝利的果實。 啟動日誌如下 . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_

linuxweblogic11g成功安裝後,啟動Getting boot identity from user

tro ace author reason tac ica ons pst pri <2015-7-1 下午05時46分33秒 CST> <Info> <Management> <BEA-141107> <Versi

web專案啟動:java.lang.IllegalStateException

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack tra

maven web-app啟動ClassNotFoundException: ContextLoaderListener

今天開啟myeclispe,啟動昨天寫了一半的專案,tomcat啟動報錯,如標題。 明明昨天好好的,啥也沒改就突然出現這個錯誤,很是無語,eclipse的bug? 錯誤說的很清楚:spring下的ContextLoaderListener.class找不到。

spring boot 上傳檔案出錯org.springframework.web.multipart.MultipartException: Could not parse multipart s

一個國慶假期回來,測試跟我說以前好好的檔案上傳不能用了,還是真實環境,程式報如下錯誤: org.springframework.web.multipart.MultipartException: Cou

Spring的初始化org.springframework.web.context.ContextLoaderListener

在web.xml中配置 <listener>     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <

用intellij idea練習spring專案時,aop程式設計,Error creating bean with name '(inner bean)#3b0143d3' balbala之類的

程式設計環境,intellij idea 這個錯誤是因為沒有匯入Spring所依賴的AspectJ的jar包引起的,目前用到的,就是aspectjweaver.jar這個包, 最蛋痛的是spring官網下載的lib中並不提供這個依賴包,需要去AspectJ官網下載,連結如

spring boot】【elasticsearch】spring boot整合elasticsearch,啟動Caused by: java.lang.IllegalStateException: availableProcessors is already set to [8], reje

  spring boot整合elasticsearch, 啟動報錯: Caused by: java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8] at

linuxweblogic11g安裝成功後,啟動Getting boot identity from user

<2015-7-1 下午05時46分33秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:

解決LinuxTomcat由於Tomcat Native問題啟動

omact服務啟動報錯日誌如下資訊: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found o

Maven項目下啟動後Eclipseorg.springframework.web.context.ContextLoaderListener

star load lex ini 並且 啟動 conf erb 嚴重 嚴重: Error configuring application listener of class org.springframework.web.context.ContextLoaderList

新建的mvc項目運行之後到頁面

文件 home red 找不到 ont 是否 span 查看 ack 新建的mvc項目運行之後報錯找不到頁面 一定要先查看路徑是否正確,一個controller 在view中 這個controller要對應一個文件夾.比如homecontroller 在視圖view中就要

cygwinjava到或無法加載主”的故障排除

java_home tools.jar 文件 1.8 pos 安裝 分號 可執行文件 $path win7 下安裝了java,命令行下可以正常運行,cygwin下報錯:找不到或無法加載主類。 經排查發現是cygwin的~/.bash_profile中畫蛇添足的配置了$CLA

errororg.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException

poi return spring use fail err process sin mapping 問題:調用的方法在一個接口類中,但我並沒有註入那個被調用的類 解決:在UserEntity前加上@Autowired @Controller public class