日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

启动tomcat遇到的问题整理

發(fā)布時(shí)間:2023/12/20 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 启动tomcat遇到的问题整理 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

問題1.[commons-attributes-api.jar]: Required extension "ant" not found.
解決:原因在于commons-attributes-compiler.jar包的MANIFEST.MF文件出現(xiàn)問題,如果對(duì)這個(gè)包沒有依賴,直接 刪除這個(gè)包的引用,項(xiàng)目就可以正常啟動(dòng),如果對(duì)這個(gè)包有依賴,那么可以通過以下兩種方式來解決。

1、修改MANIFEST.MF文件
原compiler.jar包中的MF文件結(jié)構(gòu)
程序代碼
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: Apache Maven
Built-By: hen
Package: org.apache.commons.attributes
Build-Jdk: 1.4.2_05
Extension-Name: commons-attributes-api
Specification-Title: Client API for Jakarta Commons Attributes.
Specification-Vendor: The Apache Software Foundation
Implementation-Title: org.apache.commons.attributes
Implementation-Vendor: The Apache Software Foundation
Implementation-Version: 2.2
Extension-List: ant qdox
ant-Extension-Name: ant
ant-Implementation-Version: 1.5
ant-Implementation-URL: http://www.ibiblio.org/maven/ant/jars/ant-1.5.
jar
qdox-Extension-Name: qdox
qdox-Implementation-Version: 1.5
qdox-Implementation-URL: http://www.ibiblio.org/maven/qdox/jars/qdox-1
.5.jar
Implementation-Vendor-Id: org.apache
X-Compile-Source-JDK: 1.4
X-Compile-Target-JDK: 1.4
我們可以看到URL后面的地址中含有一些不必要的字符,將MF文件修改如下
程序代碼
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: Apache Maven
Built-By: hen
Package: org.apache.commons.attributes
Build-Jdk: 1.4.2_05
Extension-Name: commons-attributes-api
Specification-Title: Client API for Jakarta Commons Attributes.
Specification-Vendor: The Apache Software Foundation
Implementation-Title: org.apache.commons.attributes
Implementation-Vendor: The Apache Software Foundation
Implementation-Version: 2.2
Extension-List: ant qdox
ant-Extension-Name: ant
ant-Implementation-Version: 1.5
ant-Implementation-URL: http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar
qdox-Extension-Name: qdox
qdox-Implementation-Version: 1.5
qdox-Implementation-URL: http://www.ibiblio.org/maven/qdox/jars/qdox-1.5.jar
Implementation-Vendor-Id: org.apache

X-Compile-Source-JDK: 1.4
X-Compile-Target-JDK: 1.4

這個(gè)問題就可以解決。 (這方法我試過了,貌似沒有什么效果,如果對(duì)這個(gè)包沒有依賴,可以刪除相關(guān)的這幾個(gè)包)

2、替換commons-attributes-compiler.jar包

問題2:The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
解決:可能是你項(xiàng)目中的諸如:catalina.jar、jsp-api.jar、servlet-api.jar、javax.servlet.jar、javax.servlet.jsp.jar等包和應(yīng)用服務(wù)器(JBoss/Tomcat等)中的包重復(fù)且比其版本低,應(yīng)用服務(wù)器在啟動(dòng)時(shí)會(huì)優(yōu)先加載項(xiàng)目中的包,這樣就導(dǎo)致和應(yīng)用服務(wù)器中的其它包不匹配。可把重復(fù)的包從項(xiàng)目中刪除,或?qū)?yīng)用服務(wù)器下的這些包拷貝到項(xiàng)目中,重啟服務(wù)即可。

?

轉(zhuǎn)載于:https://blog.51cto.com/dabuding/860637

總結(jié)

以上是生活随笔為你收集整理的启动tomcat遇到的问题整理的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。