title: Wildfly 8.x ClassNotFoundException: org.jboss.virtual.VFS
body: <p>I'm trying to deploy an <code>ear</code> application on a wildfly 8.x server.</p>
  
  <p>The problem is when I want to start my server, the log console printed me the following errors: </p>
  
  <pre><code>    14:00:09,825 ERROR [org.springframework.core.io.VfsUtils] (MSC service thread 1-7) JBoss VFS packages (for both JBoss AS 5 and 6) were not found - JBoss VFS support disabled
      14:00:09,835 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-7) Context initialization failed: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/beans/gardian_beans.xml]; nested exception is java.lang.ExceptionInInitializerError
              at 
     Caused by: java.lang.ExceptionInInitializerError
              at org.springframework.core.io.support.PathMatchingResourcePatternResolver$VfsResourceMatchingDelegate.findMatchingResources(PathMatchingResourcePatternResolver.java:652) [spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
              ... 24 more
     Caused by: java.lang.IllegalStateException: Cannot detect JBoss VFS packages
              at org.springframework.core.io.VfsUtils.&lt;clinit&gt;(VfsUtils.java:109) [spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
              ... 39 more
     Caused by: java.lang.ClassNotFoundException: org.jboss.virtual.VFS from [Module "org.springframework.spring:main" from local module loader @67117f44 (finder: local module finder @5d3411d (roots: /abb/assetsuite/wildfly-8.2.1.Final.as/modules,/abb/assetsuite/wildfly-8.2.1.Final.as/modules/system/layers/base))]
              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]
              at org.springframework.core.io.VfsUtils.&lt;clinit&gt;(VfsUtils.java:99) [spring-core-3.2.9.RELEASE.jar:3.2.9.RELEASE]
              ... 39 more
  </code></pre>
  
  <p>My JBoss does not recognize <code>org.jboss.virtual.VFS</code> class.</p>
  
  <p>Here is my <code>module.xml</code> for my module <code>org.springframework.spring.main</code> : </p>
  
  <pre><code>&lt;module xmlns="urn:jboss:module:1.0" name="org.springframework.spring"&gt;
  
      &lt;resources&gt;
          &lt;resource-root path="aopalliance-1.0.0.jar"/&gt;
          &lt;!--&lt;resource-root path="groovy-all-2.3.4.jar"/&gt;--&gt;
          &lt;resource-root path="spring-aop-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-beans-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-context-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-core-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-expression-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-jdbc-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-jms-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-tx-3.2.9.RELEASE.jar"/&gt;
          &lt;resource-root path="spring-web-3.2.9.RELEASE.jar"/&gt;
      &lt;/resources&gt;
  
      &lt;dependencies&gt;
          &lt;module name="javax.api"/&gt;
          &lt;module name="javax.servlet.api"/&gt;
          &lt;module name="javax.jms.api"/&gt;
          &lt;module name="javax.annotation.api"/&gt;
          &lt;module name="org.apache.commons.logging"/&gt;
      &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>Of course, I have all jar referenced in the same folder as my <code>module.xml</code>..</p>