2 Replies Latest reply on Jun 16, 2011 6:14 PM by alesj

    Configure a VFS classloader in jboss-classloading.xml

    jsebfranck

      I would like to configure a classloader in order to load classes from a specific directory of the jboss virtual file system (server/default/work/jboss.web/). I think a convenient way to do that is to configure a classloader in the jboss-classloading.xml file of my war application.

       

      So I have created a WEB-INF/jboss-classloading.xml file :

       

      <?xml version="1.0" encoding="UTF-8"?>

      <classloading xmlns="urn:jboss:classloading:1.0"

                    name="Jboss6.war"

                    domain="DefaultDomain"

                    parent-domain="Ignored"

                    export-all="NON_EMPTY"

                    import-all="true">

        <root>/...../jboss-6.0.0.Final/server/default/work/</root>

      </classloading>

       

      But I have an error during the application deployment :

       

        Deployment "vfs:///Users/Veronique/Documents/js/jboss-6.0.0.Final/server/default/deploy/Jboss6.war" is in error due to the following reason(s): org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:classloading:1.0}root not found as a child of {urn:jboss:classloading:1.0}classloading in unordered_sequence: {urn:jboss:classloading:1.0}capabilities? {urn:jboss:classloading:1.0}parent-policy? {urn:jboss:classloading:1.0}requirements?

       

      It seems there is a syntax problem in the xml declaration. I didn't find explicit documentation on how this mechanism works. Any idea of how I could fix that?

       

      Thank you in advance !