4 Replies Latest reply on Sep 4, 2019 12:27 PM by Eric Hodges

    Is there a way to coax the ModuleClassLoader into referencing XSD files from Spring JARs?

    Eric Hodges Newbie

      We have an enterprise application that uses Spring (4.3.9).  Spring XML files depend on an XSD schema file loaded from "http://www.springframework.org/schema/beans/spring-beans.xsd".  Spring provides a mechanism to load those schema from the Spring JARs, which is useful when your app server does not have access to the internet.

       

      Our app needs to be able to run on app servers that don't have access to the internet.

       

      WildFly's module class loader, however, prevents Spring from referencing the resources it needs to load the schema.  The resources are located in the Spring JARs, under the "META-INF" and "org" folders.

       

      I found instructions online to add tags to the "jboss-deployment-structure.xml" file in our EAR that will make the resources available to the module class loader, but that only works if I add Spring as a module to WildFly itself, outside of our enterprise app.  We don't want to modify WildFly.  We want Spring code in our app to reference Spring resources also in our app.

       

      Is there some way to do this that I haven't been able to find?  It seems like if our code can reference the Spring class files, it ought to be able to reference the XSD and "spring.schemas" files located in the Spring JARs.