简体   繁体   English

JBoss:在application.war / WEB-INF / lib中部署JAR

[英]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.

相关问题 在JBOSS 7中,war文件可以访问ear / lib而非Web-inf / lib中的jar文件 - In JBOSS 7 can war file access a jar file located in ear/lib instead of web-inf/lib 战争部署期间,WEB-INF / lib jar中的ejb忽略了JBOSS 7模块类 - JBOSS 7 module class ignored by ejb in WEB-INF/lib jar during deploy of war Maven:将 war/web-inf/classes 中的类作为 jar 添加到 war/web-inf/lib - Maven: Adding classes from war/web-inf/classes as a jar to war/web-inf/lib JBoss 6从WEB-INF / war of lib中解压缩jar - JBoss 6 unpacks jars from WEB-INF/lib of war JBoss 4.0.2 war部署中找不到WEB-INF / lib jar - WEB-INF/lib jars not found in JBoss 4.0.2 war deploy Web组件WEB-INF LIB应该包含在war文件中的哪个jar - what jar's should Web Component WEB-INF LIB should contain in a war file 在WAR的WEB-INF / lib文件夹中重命名Maven依赖项 - Renaming Maven dependency in WAR's WEB-INF/lib folder JBOSS订购WEB-INF / lib的内容 - JBOSS ordering of contents of WEB-INF/lib 将MySQL连接器JAR放在我的WAR的WEB-INF / lib而不是$ CATALINA_HOME / common / lib中? - Place MySQL connector JAR in WEB-INF/lib of my WAR instead of in $CATALINA_HOME/common/lib? 将struts-core2.xxjar放在哪里? (在WEB-INF / lib或jboss共享库中) - where to put struts-core2.x.x.jar? (in WEB-INF/lib or jboss shared lib)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM