[commons-attributes-api-2.2.jar]: Required extension [ant] not found.

web应用的war包部署到tomcat下面时有如下类似错误信息:

[commons-attributes-api-2.2.jar]: Required extension [ant] not found.

这个错误会导致项目启动失败,无法访问应用。这个问题出现的原因是commons-attributes-api-2.2.jar包的MF文件存在问题导致的。如果对这个jar包没有依赖,直接删除该jar包的引用即可;如果对这个包有依赖,那么可以通过修改 jar包里的 META-INF/MANIFEST.MF 文件的方式来解决:
原文件的有问题的内容如下:

多了两个回车换行,修改后如下:

修改后的jar包替换原来得,重新启动项目就正常了。

ps:如果项目中有 commons-attributes-compiler-2.2.jar 包也需要修改 MF文件,同样存在该问题。

本文介绍到此介绍。

—————–  EOF @Michael Sun —————–

原创文章,转载请注明: 转载自micmiu – 软件开发+生活点滴[ http://www.micmiu.com/ ]

本文链接地址: http://www.micmiu.com/exception/commons-attributes-required-extension-ant-not-found/

发表评论?

1 条评论。

  1. nice! 😮

回复给 醉梦、仙霖 ¬
取消回复


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">