<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Class Loading and Modules
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/bill.rosenberg">Bill Rosenberg</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/763029#763029">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>here is my deployment outline for AS7:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>JB7.ear</p><p>--jboss-deployment-structure.xml</p><p>--JB7EJB.jar</p><p>--JB7Web.war</p><p>--JB7Dao.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have a question regarding AS7 module class loading. I am trying to use the quartz library and setup a module to </p><p>do so. I updated the jboss-deployment-structure.xml to look like this after setting up my quartz module</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"></p><p>    <ear-subdeployments-isolated>true</ear-subdeployments-isolated></p><p>    <deployment></p><p>        <dependencies></p><p>             </p><p>            <module name="org.hibernate" slot="3" /></p><p>             <module name="org.quartz" /></p><p>             </p><p>        </dependencies></p><p>    </deployment></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p></jboss-deployment-structure></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>when i deploy and run the app a getthis exception:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Caused by: java.lang.NoClassDefFoundError: org/quartz/SchedulerFactory</p><p>    at com.lightspeed.ejb.Session1.hello(Session1.java:22) [JB7EJB.jar:]</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_13]</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_13]</p><p>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_13]</p><p>    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_13]</p><p>    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]</p><p>    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]</p><p>    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)</p><p>    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]</p><p>    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]</p><p>    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]</p><p>    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]</p><p>    ... 37 more</p><p>    </p><p>When i change the  jboss-deployment-structure.xml to look like this, it runs fine:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"></p><p>    <ear-subdeployments-isolated>true</ear-subdeployments-isolated></p><p>    <deployment></p><p>        <dependencies></p><p>             </p><p>             <module name="org.hibernate" slot="3" /></p><p>            </p><p>             </p><p>        </dependencies></p><p>    </deployment></p><p>    <sub-deployment name="JB7EJB.jar"></p><p>        <dependencies></p><p>             </p><p>            <module name="org.quartz" /> </p><p>            </p><p>        </dependencies></p><p>    </sub-deployment></p><p></jboss-deployment-structure></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I thought that if i put the dependencies under the top 'deployment' section, that all deployments will pick up the quartz module, but i have to add the</p><p>  '<sub-deployment name="JB7EJB.jar">' section to have the JB7EJB deloyment pick up the quartz module.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> What am i missing here?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> thank you,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> Bill</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/763029#763029">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>