简体   繁体   中英

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. Unfortunately the JAR is not loaded, as I get in the application logs:

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). Please note that none of the libraries are in the JBoss /lib folder.

Question : is there a reason why certain JAR's are not loaded? How can I check which ones are?

Many thanks!

The jaxen jar is in the JBoss lib folder. At least it's supposed to be on version 4.3.2. Check the folder: jboss-4.2.3.GA/server/default/lib (replace default for whatever instance name you're using).

I've also had troubles with the jaxen jar. The solution was to remove it from my WEB-INF/lib. If you're using maven you can do it like this:

<dependency>
    <groupId>jaxen</groupId>
    <artifactId>jaxen</artifactId>
    <version>1.1.1</version>
    <scope>provided</scope>
</dependency>

JBoss already includes jaxen. Check server/default/lib. Probably the included jboss lib is conflicting with your own.

If you're sure you will always deploy on jboss, you can just leave the jaxen jar out of your war. If you're not, you could remove the jaxen from your JBoss instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM