1 Reply Latest reply on Aug 6, 2008 11:52 AM by peterj

    loading xml in jboss

    gcameo

      I have an xml file which I want to load like this

      InputStream in = getClass().getClassLoader().getResourceAsStream("META-INF/model.xml");
       InputSource inputSource = new InputSource(in);

      but in is always null . Can someone tell me what I am doing wrong??

        • 1. Re: loading xml in jboss
          peterj

          What version of JBossAS?

          Also, where is META-INF located - in a JAR, a WAR, and EAR?

          Also, try this instead:

          in = Thread.currentThread().getContextClassLoader().getResourceAsStream(...);