1 Reply Latest reply on Mar 2, 2013 1:18 AM by ednaswap

    Axis2.war equivalent to Eclipse project root path

    ednaswap

      I have multiple non-jar resources to load within an aar file of Axis2.war.

       

      Most of them are successfully loaded using configuration table where absolute path of

       

      each resource(text files) is specified.

       

      But I have an open-source-based jar that loads resource at the root path(??)

       

      of Eclipse project which is at the same level of "src" folder.

       

      When the classes of the project above are jarred into a lib of aar,

       

      the resources has no way of being read by the class that needs it.

       

      I've put them just outside of aar, within the lib of aar or at the same level of the lib.

       

      They just don't work.

       

      Please remember that this is the case where getResourceStream or something like that

       

      can't be used, because the open source jar has hard coded the path to be read

       

      from the root path of a project of Eclipse.

       

      And also this is not the typical ClassNotFound exception of Axis2 load().

       

      Then my question is where the Eclipse-project-root-path-equivalent in Axis2.war which is

       

      deployed in JBoss 5.1 is.

       

      I am not sure if this question is understood, but please give a bit of advice.

       

      capture.JPG

       

      capture2.JPG

        • 1. Re: Axis2.war equivalent to Eclipse project root path
          ednaswap

          I am replying to my own problem.


          I used System.getProperty("user.dir") to find exactly where the jar

           

          refers to the resources and in my case

           

          C:\Users\MYUSERACCOUNT\Development\server\jboss5.1\server\default\deploy\axis2.war\WEB-INF\services

           

          MYUSERACCOUNT is the root of an AAR in Axis2.war service folder.

           

          So I placed the required resource folder within my account folder ( Windows 7 )

           

          and it worked... WTH.