1 2 Previous Next 24 Replies Latest reply: Apr 19, 2015 9:56 AM by Shaune Reynolds RSS

    Class path not loading from web-inf/classes

    Martin Thorpe Newbie

      Hello.

      I have been asked to start a new issue for this.

       

      Using AS 7.1.1 final

       

      I have a file stored in web-inf/classes dir for simple loading to the class path.

      This file is stored in

      EAR/WAR/web-inf/classes

       

      I load the file like this

      getClass().getClassLoader().getResource("/myfile.ext");


       

      Then I get a file not found exception from JBOSS because it cannot load the file from this location

      vfs:/C:/jboss-7.1.1/bin/content/ear/war/WEB-INF/classes/myfile.ext

       

      There is not bin/content directory.

      It suprises me that this does not work out of the box. Most of my daily work is with WebSphere which has no problems with this.

      Normally web-inf/classes is loaded onto the class path.

       

      Any ideas what the issue is? Seems like a bug to me as the location it is searcing in bin/content does not even exist. It obviously finds the file on the class path.

       

      thanks for reading

      cheers


        1 2 Previous Next