I am deploying ear on jboss-as-7, it has two ejb jars and one war file. Below is the structure of application.xml file.
<module>
<ejb>ejb1.jar</ejb>
</module>
<module>
<web>
<web-uri>web1.war</web-uri>
<context-root>root/test</context-root>
</web>
</module>
<module>
<ejb>ejb2.jar</ejb>
</module>
This ear deployment requires external library dependency so I have added dependency in jboss-deployment-structure.xml file.
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="deployment.local.fwk" export="true"/>
</dependencies>
</deployment>
<module name="deployment.local.fwk">
<resources>
<resource-root path="myclasses.jar"/>
</resources>
</module>
</jboss-deployment-structure>
I have this jar file in module/local/fwk folder. I am not sure what is missing here, while deploying I am getting NoClassDefFoundError for classes which are present in myclasses.jar.