且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JBoss:EAR 中的 WAR 文件在类路径上找不到 JAR 库

更新时间:2021-06-28 01:30:21

标签在 application.xml 是一个 JavaEE5 特性,我不要认为 JBoss 4.3 完全符合 JavaEE5(它可以做 EJB3,是的,但它只是部分支持).

The <library-directory> tag in application.xml is a JavaEE5 feature, and I don't think that JBoss 4.3 is fully JavaEE5-compliant (it can do EJB3, yes, but it's only partial support).

因此您需要返回使用显式声明的 JAR 文件:

So you need to go back to using explicitly declared JAR files:

<module>
    <java>lib/core.jar</java>
</module>

至于您的属性文件,您需要将它们所在的目录添加为 Java 模块,例如:

As for your properties files, you need to add the directory that they're in as a java module, so for your example:

<module>
    <java>lib/classes</java>
</module>