title: java.lang.NoClassDefFoundError: Lcom/hazelcast/core/HazelcastInstance
body: <p>I am trying to include hazelcast jars in Wildfly-8.2.1-Final. I have done following steps.</p>
  
  <ol>
  <li>Included all jars to wildfly_Home\modules\system\layers\base\com\hazelcast\main</li>
  <li><p>Included module.xml inside the main folder.
  <code>
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;module xmlns="urn:jboss:module:1.3" name="com.hazelcast"&gt;
  &lt;resources&gt;
  &lt;resource-root path="hazelcast-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-all-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-client-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-cloud-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-hibernate-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-spring-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-wm-2.2.jar"/&gt;
  &lt;resource-root path="hazelcast-ra-2.2.rar"/&gt;
  &lt;/resources&gt;
  &lt;dependencies&gt;
  &lt;module name="asm.asm"/&gt;
  &lt;module name="javax.faces.webapp.FacetTag"/&gt;
  &lt;module name="javax.servlet.jsp.jstl.tlv.ScriptFreeTLV"/&gt;
  &lt;/dependencies&gt;
  &lt;/module&gt;</code></p></li>
  <li><p>Included a jboss-deployment-structure.xml file inside META-INF of my .ear file. This ear file includes two other war sub-deployments.
  <code>
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jboss-deployment-structure&gt;
  &lt;deployment&gt;
  &lt;dependencies&gt;
  &lt;module name="com.hazelcast"/&gt;
  &lt;/dependencies&gt;
  &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt;</code></p></li>
  </ol>
  
  <p>But when I trying to deploy ear files, I am getting following error. </p>
  
  <p><code>2015-10-29 12:00:25,225 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.subunit."ssp-ear-admin-1.7.6-SNAPSHOT.ear"."ssp-ws-notification-1.7.6-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ssp-ear-admin-1.7.6-SNAPSHOT.ear"."ssp-ws-notification-1.7.6-SNAPSHOT.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "ssp-ws-notification-1.7.6-SNAPSHOT.war" of deployment "ssp-ear-admin-1.7.6-SNAPSHOT.ear"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
  Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.ericsson.ssp.ws.PublishImpl with ClassLoader ModuleClassLoader for Module "deployment.ssp-ear-admin-1.7.6-SNAPSHOT.ear.ssp-ws-notification-1.7.6-SNAPSHOT.war:main" from Service Module Loader
      at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
      at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
      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:159) [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
      ... 5 more
  Caused by: java.lang.NoClassDefFoundError: Lcom/hazelcast/core/HazelcastInstance;
      at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_79]
      at java.lang.Class.privateGetDeclaredFields(Class.java:2499) [rt.jar:1.7.0_79]
      at java.lang.Class.getDeclaredFields(Class.java:1811) [rt.jar:1.7.0_79]
      at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.&lt;init&gt;(ClassReflectionIndex.java:57) [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
      at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
      ... 10 more
  Caused by: java.lang.ClassNotFoundException: com.hazelcast.core.HazelcastInstance from [Module "deployment.ssp-ear-admin-1.7.6-SNAPSHOT.ear.ssp-ws-notification-1.7.6-SNAPSHOT.war:main" from Service Module Loader]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
      ... 15 more
  2015-10-29 12:00:25,345 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-2) JBAS014613: Operation ("add") failed - address: ([{"deployment" =&gt; "ssp-ear-admin-1.7.6-SNAPSHOT.ear"}]) - failure description: {"JBAS014671: Failed services" =&gt; {"jboss.deployment.subunit.\"ssp-ear-admin-1.7.6-SNAPSHOT.ear\".\"ssp-ws-notification-1.7.6-SNAPSHOT.war\".POST_MODULE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"ssp-ear-admin-1.7.6-SNAPSHOT.ear\".\"ssp-ws-notification-1.7.6-SNAPSHOT.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"ssp-ws-notification-1.7.6-SNAPSHOT.war\" of deployment \"ssp-ear-admin-1.7.6-SNAPSHOT.ear\"
      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.ericsson.ssp.ws.PublishImpl with ClassLoader ModuleClassLoader for Module \"deployment.ssp-ear-admin-1.7.6-SNAPSHOT.ear.ssp-ws-notification-1.7.6-SNAPSHOT.war:main\" from Service Module Loader
      Caused by: java.lang.NoClassDefFoundError: Lcom/hazelcast/core/HazelcastInstance;
      Caused by: java.lang.ClassNotFoundException: com.hazelcast.core.HazelcastInstance from [Module \"deployment.ssp-ear-admin-1.7.6-SNAPSHOT.ear.ssp-ws-notification-1.7.6-SNAPSHOT.war:main\" from Service Module Loader]"}}
  2015-10-29 12:00:25,345 ERROR [org.jboss.as.server] (XNIO-1 task-2) JBAS015870: Deploy of deployment "ssp-ear-admin-1.7.6-SNAPSHOT.ear" was rolled back with the following failure message: 
  {"JBAS014671: Failed services" =&gt; {"jboss.deployment.subunit.\"ssp-ear-admin-1.7.6-SNAPSHOT.ear\".\"ssp-ws-notification-1.7.6-SNAPSHOT.war\".POST_MODULE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"ssp-ear-admin-1.7.6-SNAPSHOT.ear\".\"ssp-ws-notification-1.7.6-SNAPSHOT.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"ssp-ws-notification-1.7.6-SNAPSHOT.war\" of deployment \"ssp-ear-admin-1.7.6-SNAPSHOT.ear\"
      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.ericsson.ssp.ws.PublishImpl with ClassLoader ModuleClassLoader for Module \"deployment.ssp-ear-admin-1.7.6-SNAPSHOT.ear.ssp-ws-notification-1.7.6-SNAPSHOT.war:main\" from Service Module Loader
      Caused by: java.lang.NoClassDefFoundError: Lcom/hazelcast/core/HazelcastInstance;
      Caused by: java.lang.ClassNotFoundException: com.hazelcast.core.HazelcastInstance from [Module \"deployment.ssp-ear-admin-1.7.6-SNAPSHOT.ear.ssp-ws-notification-1.7.6-SNAPSHOT.war:main\" from Service Module Loader]"}}
  2015-10-29 12:00:25,375 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-3) HV000001: Hibernate Validator 5.1.3.Final
  2015-10-29 12:00:25,451 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015974: Stopped subdeployment (runtime-name: ssp-ws-notification-1.7.6-SNAPSHOT.war) in 106ms
  2015-10-29 12:00:29,884 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015974: Stopped subdeployment (runtime-name: ssp-1.7.6-SNAPSHOT.war) in 4537ms
  2015-10-29 12:00:29,944 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment ssp-ear-admin-1.7.6-SNAPSHOT.ear (runtime-name: ssp-ear-admin-1.7.6-SNAPSHOT.ear) in 4597ms
  2015-10-29 12:00:29,944 INFO  [org.jboss.as.controller] (XNIO-1 task-2) JBAS014774: Service status report
  JBAS014775:    New missing/unsatisfied dependencies:
        service jboss.naming.context.java.module."ssp-ear-admin-1.7.6-SNAPSHOT"."ssp-1.7.6-SNAPSHOT" (missing) dependents: [service jboss.deployment.subunit."ssp-ear-admin-1.7.6-SNAPSHOT.ear"."ssp-1.7.6-SNAPSHOT.war".INSTALL] 
  JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."ssp-ear-admin-1.7.6-SNAPSHOT.ear"."ssp-ws-notification-1.7.6-SNAPSHOT.war".POST_MODULE</code></p>
  
  <p>Am I missing something? Please, let me know.
  Thanks in advance.</p>