2 Replies Latest reply on Dec 16, 2004 7:20 AM by rachna_agg

    JBoss-3.2.6 FileNotFoundException

    rachna_agg

      Hi, I have recently shifted to JBoss-3.2.6 from 3.2.3 and I'm facing some issues of FileNotFoundException.
      Actually, some of the code in my application uses getResource method on a class to get its full path and then uses that path to find a class which is present in the same package as the first class.
      The problem I'm facing is that the getResource method works fine and returns me the full path from my system's root directory to the JBoss's deploy directory to the class in the "sar" but when I am finding the second file in the same package with this same path it is giving me FileNotFoundException.
      FYI, this was running successfully in JBoss-3.2.3.
      Does somebody has any idea about this behaviour?

      Thanks,
      Rachna

        • 1. Re: JBoss-3.2.6 FileNotFoundException
          narayanrm



          can you paste the piece of code which is returning null?

          • 2. Re: JBoss-3.2.6 FileNotFoundException
            rachna_agg

            The piece of code that is giving me error is:

            new FileReader(new File(URLDecoder.decode(fileName,"UTF-8")))
            

            There's another thing that I've found.
            Actually my code was packaged inside a jar and then deployed in the server.
            But when I deployed it in exploded form(in folders hierarchy), the code ran successfully, that is, now the server was able to find the file specified. So, I wonder whether its a bug of JBoss-3.2.6 of not being able to find a class file inside a jar because it was running successfully under JBoss-3.2.3.

            Thanks,
            Rachna