0

我有一个具有以下结构的耳朵文件

META-INF/
META-INF/MANIFEST.MF
META-INF/application.xml
META-INF/build.properties
doi-ejb.jar
doi-web.war
lakshmi-ejb.jar
lakshmi-std-cmp-ejb.jar
lib/
lib/commons-1.0.jar
lib/commons-web-1.0.jar
lib/doi-int-test-lib.jar
lib/doi-lib.jar
lib/doi-unit-test-lib.jar
lib/lakshmi-lib.jar
lib/lakshmi-std-cmp-lib.jar

战争文件 ( doi-web.war) 包含

META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/ch/[...]
WEB-INF/classes/common-messages.properties
WEB-INF/classes/common-messages_de.properties
WEB-INF/classes/common-messages_it.properties
WEB-INF/classes/commons.properties
WEB-INF/classes/messages.properties
WEB-INF/faces-config.xml
WEB-INF/glassfish-web.xml
WEB-INF/web.xml
resources/
resources/css/[...]
resources/images/[...]
resources/scripts/
view/[...]

我可以在 Glassfish 中部署 ear 文件而不会出现任何错误:

[...]

javax.enterprise.system.container.web.com.sun.enterprise.web || WEB0671: Loading application [doi#doi-web.war] at [/doi]
javax.enterprise.system.tools.admin.org.glassfish.deployment.admin || doi was successfully deployed in 5,251 milliseconds.

如果我尝试启动应用程序,我会得到:

[...]
Caused by: java.util.MissingResourceException: Can't find bundle for base name /commons, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
at ch.ethz.id.wai.web.controller.ApplicationSettingsController.setup(ApplicationSettingsController.java:25)
... 67 more

现在据我了解,这意味着/commons.properties应该在类路径中。目录WEB-INF/classes不应该在类路径中吗?Glassfish 会读取该WEB-INF目录,因为该web.xml文件已被识别。

4

0 回答 0