Deployment of third party jar in wildfly-9.0.2.Final
<p>In order to visible external jars to more than one application i usually placed external jars at $JBOSS_HOME/server/default/lib directoy in JBOSS 5.x.These jars were automaically up at startp of AS.
How this will i do in wildfly-9.0.2.Final.</p>

<p>@Sam Thankx for reply
But still i am getting error , Kindly please see my scenario as following
Structure</p>

<ol>
<li>There is jar archive named as test.jar is present in test.ear</li>
<li><p>In test.jar there is EJB3 session bean java class. In this class there is import stmt as.</p>

<p>import com.oracle.asmc.ejb3.statelesssession.SLE3DecryptLocal;</p></li>
<li>Above package 'com.oracle.asmc.ejb3.statelesssession.SLE3DecryptLocal' is present in testclient.jar</li>
</ol>

<p>Note - Above testclient.jar is not part of test.ear.(I want to access this testclient.jar from multiple EARs)</p>

<p>To deploy test.ear,i have done following steps</p>

<ol>
<li>./jboss-cli.sh -c (present in bin directory)</li>
<li>module add --name=testclient --resources=~/client_jar/testclient.jar</li>
<li><p>I have added following configuration in jboss-deployment-structure.xml and placed in META-INF directory while creating test.ear.</p>

<pre><code>&lt;?xml version="1.0"?&gt;       
   &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"&gt;
  &lt;deployment&gt;
  &lt;dependencies&gt;
       &lt;module name="testclient" /&gt;
  &lt;/dependencies&gt;
&lt;/deployment&gt;
&lt;/jboss-deployment-structure&gt;
</code></pre></li>
<li><p>For deploying Test.ear applicaiton, accessed '<a href="http://127.0.0.1:9990/" rel="nofollow">http://127.0.0.1:9990/</a>' and travesed link Deployments --> Add -->Add Deployment --->FINISH
But still got following error.</p>

<pre><code>12:19:22,439 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "test.ear" (runtime-name: "test.ear")
12:19:22,602 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0207: Starting subdeployment (runtime-name: "test.jar")
12:19:22,608 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0207: Starting subdeployment (runtime-name: "test.war")
12:19:23,524 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0003: Processing weld deployment test.ear
12:19:23,631 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-2) HV000001: Hibernate Validator 5.1.3.Final
12:19:23,842 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.subunit."test.ear"."test.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."test.ear"."test.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "test.jar" of deployment "test.ear"
  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.oracle.test.SlsTestBean with ClassLoader ModuleClassLoader for Module "deployment.test.ear.test.jar:main" from Service Module Loader
 at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
 at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
 at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
 at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
 at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
 at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
  Caused by: java.lang.NoClassDefFoundError: com/oracle/asmc/ejb3/statelesssession/SLE3DecryptLocal
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
 at java.lang.Class.getDeclaredMethods(Class.java:1975)
 at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.&lt;init&gt;(ClassReflectionIndex.java:65)
 at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
  ... 10 more
  Caused by: java.lang.ClassNotFoundException: com/oracle/asmc/ejb3/statelesssession/SLE3DecryptLocal from [Module "deployment.test.ear.test.jar:main" from Service Module Loader]
 at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
 at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
 at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
 at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
 at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
 ... 15 more
</code></pre></li>
</ol>

<p>@Sam thankx for reply</p>

<p>I added 'jboss-deployment-structure.xml' in META-INF of test.jar.</p>

<p>Note- Yes, I am accessing 'com/oracle/asmc/ejb3/statelesssession/SLE3DecryptLocal' (present in testclient.jar module) from test.jar.</p>

<p>Now my test.ear contains</p>

<ol>
<li><p>META-INF/application.xml</p></li>
<li><p>test.war</p></li>
<li><p>test.jar('jboss-deployment-structure.xml' present in META-INF directory of this test.jar ) </p></li>
</ol>

<p>But still i am getting following error.</p>

<pre><code>Caused by: java.lang.NoClassDefFoundError: com.oracle.asmc.ejb3.statelesssession.SLE3DecryptLocal
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.&lt;init&gt;(ClassReflectionIndex.java:65)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
... 10 more
 Caused by: java.lang.ClassNotFoundException: com.oracle.asmc.ejb3.statelesssession.SLE3DecryptLocal from [Module "deployment.test.ear.test.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
... 15 more
</code></pre>