[英]JBoss: deployment of JAR's in application.war/WEB-INF/lib
I have an application.war folder (not as file) which contains jaxen-1.1.1.jar (in the WEB-INF/lib) directory. 我有一个application.war文件夹(不是文件),其中包含jaxen-1.1.1.jar(在WEB-INF / lib中)目录。 Unfortunately the JAR is not loaded, as I get in the application logs: 不幸的是,由于我进入了应用程序日志,因此未加载JAR:
Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.HashMap client.Service.doLogin(java.util.Map)' threw an unexpected exception:
java.lang.NoClassDefFoundError: org/jaxen/JaxenException
This is weird, since other JAR's (ie spring) seem to load correctly (which is used to parse the configuration successfully before the error occurs). 这很奇怪,因为其他JAR(例如spring)似乎已正确加载(用于在错误发生之前成功解析配置)。 Please note that none of the libraries are in the JBoss /lib folder. 请注意,所有库均不在JBoss / lib文件夹中。
Question : is there a reason why certain JAR's are not loaded? 问题 :为什么某些JAR不能加载是有原因的? How can I check which ones are? 如何检查是哪些?
Many thanks! 非常感谢!
The jaxen jar is in the JBoss lib folder. jaxen jar位于JBoss lib文件夹中。 At least it's supposed to be on version 4.3.2. 至少应该在版本4.3.2上。 Check the folder: jboss-4.2.3.GA/server/default/lib (replace default for whatever instance name you're using). 检查以下文件夹:jboss-4.2.3.GA/server/default/lib(将默认名称替换为您使用的任何实例名称)。
I've also had troubles with the jaxen jar. 我也有麻烦的jaxen jar。 The solution was to remove it from my WEB-INF/lib. 解决的办法是从我的WEB-INF / lib中删除它。 If you're using maven you can do it like this: 如果您使用的是Maven,则可以这样做:
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
JBoss already includes jaxen. JBoss已经包含jaxen。 Check server/default/lib. 检查服务器/默认/库。 Probably the included jboss lib is conflicting with your own. 可能包括的jboss lib与您自己的冲突。
If you're sure you will always deploy on jboss, you can just leave the jaxen jar out of your war. 如果您确定将始终部署在jboss上,则可以将jaxen jar排除在战争之外。 If you're not, you could remove the jaxen from your JBoss instance. 如果不是,则可以从JBoss实例中删除jaxen。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.