commons-attributes-compiler.jar: Required extension qdox not found

commons-attributes-compiler.jar: Required extension qdox not found

报这个错commons-attributes-compiler.jar: Required extension qdox not found怎么办? 

我们使用MyEclipse开发基于Spring2.0的web应用时,如果部署应用到Tomcat可能会出现commons-attributes-compiler.jar]:Requiredextensionqdoxnotfound错误。如下:

程序代码

INFO:DeployingwebapplicationarchiveGRCC.war

Sep14,200713:22:18AMorg.apache.catalina.util.ExtensionValidatorvalidateManifestResources

INFO:ExtensionValidator[/GRCC][commons-attributes-api.jar]:Requiredextension"ant"notfound.

Sep14,200713:22:18AMorg.apache.catalina.util.ExtensionValidatorvalidateManifestResources

INFO:ExtensionValidator[/GRCC][commons-attributes-compiler.jar]:Requiredextension"ant"notfound.

Sep14,200713:22:18AMorg.apache.catalina.util.ExtensionValidatorvalidateManifestResources

INFO:ExtensionValidator[/GRCC][commons-attributes-compiler.jar]:Requiredextension"javadoc"notfound.

Sep14,200713:22:18AMorg.apache.catalina.util.ExtensionValidatorvalidateManifestResources

INFO:ExtensionValidator[/GRCC]:Failuretofind3requiredextension(s).

Sep14,200713:22:18AMorg.apache.catalina.core.StandardContextstart

SEVERE:ErrorgetConfigured

Sep14,200713:22:18AMorg.apache.catalina.core.StandardContextstart

SEVERE:Context[/GRCCstartupfailedduetopreviouserrors

Sep14,200713:22:18AMorg.apache.catalina.core.StandardContextstop

INFO:Containerorg.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/GRCC]hasnotbeenstarted

原因在于commons-attributes-compiler.jar包的MANIFEST.MF文件出现问题,如果对这个包没有依赖,直接删除这个包的引用,项目就可以正常启动,如果对这个包有依赖,那么可以通过以下两种方式来解决。

1、修改MANIFEST.MF文件

原compiler.jar包中的MF文件结构

程序代码

Manifest-Version:1.0

Ant-Version:ApacheAnt1.5.3

Created-By:ApacheMaven

Built-By:hen

Package:org.apache.commons.attributes

Build-Jdk:1.4.2_05

Extension-Name:commons-attributes-api

Specification-Title:ClientAPIforJakartaCommonsAttributes.

Specification-Vendor:TheApacheSoftwareFoundation

Implementation-Title:org.apache.commons.attributes

Implementation-Vendor:TheApacheSoftwareFoundation

Implementation-Version:2.2

Extension-List:antqdox

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:ApacheAnt1.5.3

Created-By:ApacheMaven

Built-By:hen

Package:org.apache.commons.attributes

Build-Jdk:1.4.2_05

Extension-Name:commons-attributes-api

Specification-Title:ClientAPIforJakartaCommonsAttributes.

Specification-Vendor:TheApacheSoftwareFoundation

Implementation-Title:org.apache.commons.attributes

Implementation-Vendor:TheApacheSoftwareFoundation

Implementation-Version:2.2

Extension-List:antqdox

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

这个问题就可以解决。

2、替换compiler.jar包

相关推荐