11 Replies Latest reply on Mar 7, 2013 5:23 AM by Amos Feng

    Thread.currentThread().getContextClassLoader().getResource() in .ear does not work when update to AS 8.0.0.Alpha1-SNAPSHOT

    Amos Feng Apprentice

      Hi all,


      we have an ear wiht the following struct:



                           |-- btconfig.xml




      and the application.xml


      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC
          "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
        <description>BlackTie all files</description>


      we use the following codes to get btconfig.xml by getResource() but now it does not work when update to AS 8.0.0.Alpha1


              URL resource = Thread.currentThread().getContextClassLoader().getResource(env);
              if (resource == null) {
                  throw new ConfigurationException("Could not find the file: " + env);


      more details should be found on https://issues.jboss.org/browse/BLACKTIE-433. so I just want to know how to load the btconfig.xml in the .jar ?