I am deploying an ear file in jboss with a lib directory and a few jars in it. The actual jars that I need are declared in application.xml. Some of the jars in the lib directory contain references with the "wrong" names, i.e. xerces.jar, instead of xerxes-2.0.4.jar as declared in the application.xml.
The problem is that while I have exactly the same configuration in two different servers, in the one of them the exception in the title is thrown, while in the other is not. Looking at the mechanism, through the JBoss ear deployment source code, there is no special condition that should exclude the throwing of the exception and the relevant logs. I suspect some kind of race condition, but I wouldn't want to elaborate on my suspicion as I may be totally wrong. (The logging configuration in log4j.xml between the two servers is exactly the same).
Does anyone know how ear deployment in jboss work, and why its logging demonstrates such non-deterministic behavior?
EDIT: I just found out that it has to do with not properly shutting down a previous instance of the server in the machine where the exception is thrown, i.e. the jboss process is killed instead of a proper shutdown.