maven專案執行出錯
Failed to detect ServletContainerInitializers for context with name [/seckill] java.io.IOException: java.lang.ClassCastException: Cannot cast org.springframework.web.SpringServletContainerInitializer to javax.servlet.ServletContainerInitializer
由此可以看出是web配置版本出錯,pom.xml中配置如下:
更改為 即可改變錯誤,可見:.provided(已提供範圍) provided意味著打包的時候可以不用包進去,別的設施(Web Container)會提供。事實上該依賴理論上可以參與編譯,測試,執行等週期。相當於compile,但是在打包階段做了exclude的動作
相關推薦
maven專案執行出錯
Failed to detect ServletContainerInitializers for context with name [/seckill] java.io.IOException: java.lang.ClassCastException: C
Maven專案打包出錯DependencyResolutionException 解決辦法
[ERROR] Failed to execute goal on project ems-manager-mapper: Could not resolve dependencies for project com.ems.sunko:ems-manager-mapper:jar:0.0.
Eclipse中Maven專案執行Maven update project 專案JRE System Library變為1.5的解決辦法
1:問題描述 Eclipse中的Maven專案,本地Java版本1.8,每次右擊專案--maven--update project(Alt+F5) 後,專案JRE System Library 都變為1.5。 2:異常原因 檢視Maven官網 如下: This i
新安裝的eclipse匯入之前maven專案執行java.lang.ClassNotFoundException錯誤的解決
java.lang.ClassNotFoundException的解決方法 解決方法: 其他原因: 類找不到的原因會有很多,我就最近換了臺電腦後,重新安裝了eclipse等等等東西,然後匯入近原來電腦上執行好好的maven專案後,報出java.l
新建Maven專案時出錯:org.apache.maven.archiver.MavenArchiver.getManifest
新建Maven專案時出錯:org.apache.maven.archiver.MavenArchiver.getManifest eclipse新建maven專案時,pom.xml檔案第一行報錯: org.apache.maven.archiver.MavenArchiver.getMani
eclipse匯入maven專案執行找不到或無法載入主類
之所以maven專案執行找不到或無法載入主類是因為本地倉庫jar版本和專案的pom.xml裡面配置的jar不符 我先把maven倉庫全部清空了,重啟eclipse,然後右擊專案 - > maven - >update project,專案就可以運行了
maven專案執行main方法的兩個方式
一、將程式碼打成一個jar包執行 在pom.xml中增加配置 <plugin> <artifactId>maven-assembly-
使用Tomcat8外掛執行maven專案
在maven專案中配置Toncat外掛一般都使用tomcat7,程式碼如下: <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</a
在idea裡執行maven專案出現:Error: Could not find or load main class com.xxx.xxxx
原因分析:maven專案在執行時找不到主類,也就是專案啟動類找不到。可以嘗試以下方法。 思路:java檔案必須經過compile才會變成.class檔案,找不到.class檔案就是由於沒有經過編譯導致的。 可能是由於對maven專案執行了mvn clean命令,沒有執行mvn compile
maven專案直接運用tomcat外掛執行
1.在要執行的maven專案的pom.xml檔案中引入tomcat外掛 <build> <!-- 配置外掛 --> <plugins><!-- 外掛列表 --&
使用idea匯入非maven專案並編譯執行
1 匯入專案 (1) new -> project from exiting sources (2)選擇要匯入的專案 (3)非maven專案選擇以eclipse方式匯入,一直點下一步就行 2 編譯 (1)右
myeclipse中執行maven專案
法一: 右鍵專案-------run as -----maven install,這時控制檯會出現生成war包的資訊 在myeclipse工作空間的這個專案下,有個target資料夾,裡面有個.war檔案 拷到電腦安裝的tomcat資料夾的webapps下 在mye
maven部署專案執行時,丟擲空指標異常處理
個人在程式碼中犯的一個錯誤,有一個servlet的路徑有誤導致映射出問題. 異常資訊 java.lang.NullPointerException at java.lang.Class.searchMethods(Class.java:3003) &nb
建立Maven專案出錯
https://blog.csdn.net/buxiaosa01/article/details/79654672 有時候建立maven專案的時候會出錯,例如在建立Spring cloud 2 專案的時候,會出現org.apache.maven.archiver.MavenArchiver.ge
Eclipse使用Maven外掛建立Web專案時出錯 Could not resolve archetype org a
分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!  
IntelliJ IDEA 把Maven專案匯出可執行jar包
2017年04月05日 14:05:08 waterimelon 閱讀數:1574 標籤: intellij ideamaven 更多 個人分類: idea
macOS配置eclipse+maven+tomcat,並執行maven專案
最近跟著學習j2ee框架,配置環境當然少不了。 jdk使用的是7u71,因為梅老師說很多客戶配置沒有那麼高。 所以eclipse使用的版本就很低,我是用的4.5.1。 首先配置maven,我們這邊使用的是maven-3.3.9,把資料夾放到自己的路徑就行,tomcat也是如此。 to
解決執行maven專案出現 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error
最近再弄maven專案,執行起來沒有問題,但是Console控制檯會報錯,比如說如下的問題異常提示: 由此我們可以看出,報出錯誤的地方主要是slf4j的jar包,而故障碼中“Failed to load class ’
Intellij IDEA新建maven專案無法執行/新建Maven專案時沒有servlet選項
Intellij IDEA新建maven專案無法執行 Edit Configurations中無法找到Main Class 解決辦法1 隨便修改一下pom.xml,右下角會彈出一個對話方塊 點選Enable Auto-Import 重
maven專案部署到tomcat執行報錯,貼出報錯大神幫看一下
嚴重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed