2 Replies Latest reply on Mar 7, 2014 12:18 PM by Raj Haque

    ContextClassLoader is not working when war is zipped in Jboss as-7.1.1

    Raj Haque Newbie

      Hi All,

      I have some resources(reports and native sql) on my class path. When I unzip the war I can see them under  the classes folder.

       

      I have been using

      Thread.currentThread().getContextClassLoader(). getResource(".........................");

       

      This works fine when war is exploded but not when zipped. Hence I can not use JBoss maven deployments.

      I also have some more resources under jar files (jars inside the war file) . It is the same . I can not access them any more.


      I know this issue have been discussed in several post e.g.

      Class path not loading from web-inf/classes

      Re: Thread.currentThread().getContextClassLoader().getResource("") returns null

      But none of them answers correctly.

       

      Any help will be much appreciated.

       

      Thanks In advance.


      Best Regards

      Raj