JBoss/Wildfly Hibernate 3 Classloading
<p>I have an ear file which contains a <code>.war</code> file and a number of <code>.jar</code> files including <code>Spring WS</code> and <code>Hibernate 3</code>.  This app is to be ported from another app server to Wildfly.</p>

<p>So far, this has been a royal pain due to all the modules that need to be created and their almost infinite dependencies.</p>

<p>I have created a <code>jboss-deployment-structure.xml</code> file in which I've declared the <code>war</code> dependencies:  </p>

<pre><code>&lt;sub-deployment name="xxx.war"&gt; 
    &lt;dependencies&gt;
       &lt;module name="org.hibernate" slot="3"/&gt;  
       &lt;module name="org.spring.jdbc" /&gt;
       &lt;module name="org.spring.beans" /&gt;
       &lt;module name="org.spring.core" /&gt;
       &lt;module name="org.slf4j" /&gt;
    &lt;/dependencies&gt; 
&lt;/sub-deployment&gt;
</code></pre>

<p>When attempting to deploy the app, I get the following error:</p>

<pre><code>Caused by: java.lang.ClassNotFoundException: org.hibernate.event.PreUpdateEventListener from [Module "deployment.xxxEAR.ear.xxp_jar.jar:main" from Service Module Loader]
</code></pre>

<p>The problem is, how do I update deployment.xxxEAR.ear.xxp_jar.jar to include the proper module dependencies i.e. <code>&lt;module name="org.hibernate" slot="3"/&gt;</code>?</p>