title: Spring module in JBoss 7
body: <p>I'm trying to set up Spring 3.0.6 libraries as a module in JBoss 7.</p>
  
  <p>I have all of the jars in modules/org/springframework/main along with the following module.xml</p>
  
  <pre><code>&lt;module xmlns:"urn:jboss:module:1.0" name="org.springframework"&gt;
      &lt;resources&gt;
            &lt;resource-root path="org.springframework.beans-3.0.6.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="org.apache.commons.logging"/&gt;
      &lt;/dependencies&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>I added <code>org.springframework</code> to the Dependencies line in my MANIFEST.MF</p>
  
  <p>When I deploy the app the following exception is thrown while parsing my <code>spring-servlet.xml</code> file (sorry, this is from a system that is not networked)</p>
  
  <pre><code>SAXParseException: ... Cannot find the declaration of element 'beans'
  </code></pre>
  
  <p>My first thought was that the module is not being used but if I remove <code>org.springframework</code> from my Dependencies line it fails to find <code>org.springframework.web.context.ContextLoaderListener</code></p>
  
  <p>Everything works fine if I put the jars in WEB-INF/lib instead of using the module.</p>
  
  <p><code>spring-servlet.xml</code> contains the following schema reference</p>
  
  <pre><code>http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  </code></pre>
  
  <p>so I put <code>spring-beans-3.0.xsd</code> in the same directory as <code>spring-servlet.xml</code> and modified the xml to</p>
  
  <pre><code>http://www.springframework.org/schema/beans spring-beans-3.0.xsd
  </code></pre>
  
  <p>but still no luck.</p>
  
  <p>Anybody have an idea of why the class files are found but the xsd files are not?</p>