title: Jboss 6.4EAP ClassNotFoundException from [Module "org.jboss.as.jmx:main" from local module loader @44f218 (finder: local module finder
body: <p>I am migrating an EAR file from JBoss 5 to Jboss EAP 6.4.
  I added a custom module com.documentum.dfc containing all classes required by my EAR.
  Strangely enough I clearly see some of the classes being loaded (com.documentum...) but still it is unable to find a Factory class that is provide in the same jar file as the classes that succesfully instantiated..
  I guess it hass something to do with the Factory mechanism being loaded via another classloader, or the classloader looking in the wrong place for this specific class.. It should be searching for it in the com.documentum.dfc module, but it seems to search in org.jboss.as.jmx:main</p>
  
  <p>Any idea what is going wrong here? </p>
  
  <pre><code>Caused by: javax.xml.parsers.FactoryConfigurationError: Provider com.documentum.xml.jaxp.DfDocumentBuilderFactoryImpl not found
      at com.documentum.xml.jaxp.DfDocumentBuilderFactory.newInstance(DfDocumentBuilderFactory.java:27)
      at com.documentum.xml.common.DfParserFactory.&lt;init&gt;(DfParserFactory.java:40)
      at com.documentum.xml.common.DfParserFactory.getInstance(DfParserFactory.java:62)
      at com.documentum.fc.internal.xml.XMLUtilsFactory.getParserFactory(XMLUtilsFactory.java:17)
      at com.documentum.fc.client.impl.bof.cache.CacheManifest.initCacheContentFile(CacheManifest.java:534)
      at com.documentum.fc.client.impl.bof.cache.CacheManifest.init(CacheManifest.java:45)
      at com.documentum.fc.client.impl.bof.cache.DefaultLocalAccessor.init(DefaultLocalAccessor.java:23)
      at com.documentum.fc.client.impl.bof.cache.ClassCacheManager.initDocbase(ClassCacheManager.java:597)
      at com.documentum.fc.client.impl.bof.cache.ClassCacheManager.initialDiscovery(ClassCacheManager.java:588)
      at com.documentum.fc.client.impl.bof.cache.ClassCacheManager.&lt;init&gt;(ClassCacheManager.java:440)
      at com.documentum.fc.client.impl.bof.cache.ClassCacheManager.getInstance(ClassCacheManager.java:52)
      at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.init(ModuleManager.java:317)
      at com.documentum.fc.client.impl.bof.classmgmt.ModuleManager.getInstance(ModuleManager.java:43)
      at com.documentum.fc.client.security.impl.DfcIdentityPublisher.&lt;init&gt;(DfcIdentityPublisher.java:44)
      at com.documentum.fc.client.security.internal.RegistrationMgr.register(RegistrationMgr.java:34)
      at com.documentum.fc.impl.RuntimeContext.&lt;clinit&gt;(RuntimeContext.java:195)
      at com.documentum.fc.client.DfClient.&lt;clinit&gt;(DfClient.java:772)
      at com.documentum.com.DfClientX.getLocalClient(DfClientX.java:43)
      at nl.enexis.service.mbean.dctm.DctmSessionManager.init(DctmSessionManager.java:43)
      at nl.enexis.service.mbean.dctm.DctmSessionManager.&lt;init&gt;(DctmSessionManager.java:34)
      at nl.enexis.service.mbean.dctm.DctmConnectionService.getSessionManager(DctmConnectionService.java:33)
      at nl.enexis.service.mbean.dctm.DctmConnectionService.startService(DctmConnectionService.java:58)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:258)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:236)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:161)
      at org.jboss.system.ServiceMBeanSupport.postRegister(ServiceMBeanSupport.java:377)
      at com.sun.jmx.mbeanserver.MBeanSupport.postRegister(MBeanSupport.java:182) [rt.jar:1.7.0_80]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegister(DefaultMBeanServerInterceptor.java:1024) [rt.jar:1.7.0_80]
      ... 12 more
  Caused by: java.lang.ClassNotFoundException: com.documentum.xml.jaxp.DfDocumentBuilderFactoryImpl from [Module "org.jboss.as.jmx:main" from local module loader @44f218 (finder: local module finder @724357 (roots: d:\Programs\JBossEAP-6.4.0\modules,d:\Programs\JBossEAP-6.4.0\modules\system\layers\base\.overlays\layer-base-jboss-eap-6.4.14.CP,d:\Programs\JBossEAP-6.4.0\modules\system\layers\base))]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:211) [jboss-modules.jar:1.3.8.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.8.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.8.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.8.Final-redhat-1]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.8.Final-redhat-1]
      at com.documentum.xml.jaxp.DfFactoryFinder.newInstance(DfFactoryFinder.java:135)
      at com.documentum.xml.jaxp.DfFactoryFinder.find(DfFactoryFinder.java:273)
      at com.documentum.xml.jaxp.DfDocumentBuilderFactory.newInstance(DfDocumentBuilderFactory.java:19)
      ... 40 more
  </code></pre>
  
  <p>Structure of my EAR:</p>
  
  <pre><code>-lib
  -- several libs
  -META-INF
  --application.xml
  --beans.xml
  --jboss-classloading.xml
  --jboss-deployment-structure.xml
  -enexisServiceCommonsEJB-1.0.0.jar
  </code></pre>
  
  <p>jboss-deployment-structure.xml:</p>
  
  <pre><code>&lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"&gt;
      &lt;!--
      &lt;ear-subdeployments-isolated&gt;false&lt;/ear-subdeployments-isolated&gt;
      --&gt;
      &lt;deployment&gt;
          &lt;dependencies&gt;
              &lt;module name="com.documentum.dfc" export="true"/&gt;
              &lt;!--
              &lt;module name="org.jboss.as.ejb3" export="true"/&gt;
              &lt;module name="org.jboss.as.system-jmx" export="true"/&gt;
              &lt;module name="org.jboss.as.jmx" export="true"/&gt;
              --&gt;
          &lt;/dependencies&gt;
      &lt;/deployment&gt;
    &lt;sub-deployment name="enexisServiceCommonsEJB-1.0.0.jar"&gt;
  
      &lt;dependencies&gt;
              &lt;module name="com.documentum.dfc" export="true"/&gt;
  &lt;!--
              &lt;module name="org.jboss.as.ejb3" export="true"/&gt;
              &lt;module name="org.jboss.as.system-jmx" export="true"/&gt;
              &lt;module name="org.jboss.as.jmx" export="true"/&gt;
  --&gt;
       &lt;/dependencies&gt;
      &lt;local-last value="true" /&gt;
    &lt;/sub-deployment&gt;  
  
  &lt;/jboss-deployment-structure&gt;
  </code></pre>