The above problem is solved by adding custom module for hibernate 3.
<module name="org.hibernate" slot="3" export="true"/>
I have other question regarding same structure....
|-- Message.jar ( EJB Jar )
|-- Queue.jar ( EJB Jar )
|-- Console.war ( war )
|----WEB-INF/LIB... ( Here, at deployment time the referenced jar are being copied from EAR/LIB .. e.g spring jar)
|-- lib ( Hibernate 3 jars + other jars )
Here, the Console.war refers to ECOM.war/Lib jar files at compile time for compilation errors. When I do deploy the EAR, the referenced jar files from EAR Lib is also copiled to Console.war / WEB-INF/lib.
This creates the class loading issue.
How would I exclude the WAR / LIB at jboss deployment process using jboss-deployment-structure.xml so, that classloading issue can be resolved ?
<sub-deployment name="Console.war" >
<resource-root path="WEB-INF/lib/*" >
<module name="deployment.ECOM.ear.Message.jar" export="true" services="export"/>
Something like this.....?
Please provide your suggestion or better deployment approach... Thanks in advance.