I am working on JBoss 5.0.0 GA. I have an .ear file which contains few libraries(.jar files) at the root level in the ear.
I was under the impression that all the libraries(.jar files) at the root level of ear are in the classpath by default but i get class not found exceptions while deploying the ear. However If, i add the jar file to the application.xml then it works fine.
Is this the intended behaviour? Shouldn't JBoss add the libraries to classpath by default?
Originally posted by Peter Johnson: Yes, this is the intended behavior. Only JAR files in the lib directory within the EAR file are automatically added to the classpath.
This question might be silly but want some clarification from you. I have few .properties files at the root level of ear and JBoss picks all the files which means they are in the classpath by default then why doesn't it pick the jar files? Is it how the JBoss is designed?
Yes, it is strange but true. But recall that if you place a directory in your classpath that the JVM does not pick up the JAR files located in that directory - you have to add the JAR files specifically. (Rumor has it that this will be "fixed" in JDK 7...)