2 Replies Latest reply on Dec 19, 2013 2:44 PM by abillconsl

    File.list() very odd problem


      I have a Java stored procedure in the Oracle DB 11g. What it does is read files in a Unix directory and then goes on and works with the files. I use this exact means in other Java SPs, but always accessing a different Unix directory. This is the first time I am having this problem.


      What the problem is, is that List() on that directory is only returning 1 (one) entry into the array that captures the results. That particular entry is a sub-directory.


      It's possible that this is more a Unix question than a Java one, but I don't know that, and I'd like to diagnose what is going on. I have been working with the DBA and he has opened up permissions on that directory and all the files in it to the world, and still only this one entry - always the same one - is returned.


      This is not a filtering problem, as I've affirmed that list() - w/o the filter passed in - always only returns this one entry. I checked readability, as I was checking everything else I could think of, using canRead() on the directory and it returns true, in case someone asks.


      If I run the code from a program that run from the Unix command prompt it works fine. If I run the same Java SP on a different Unix directory it works fine.


      If anyone can think of anything else to check I'd be obliged very much. Thank you,



        • 1. Re: File.list() very odd problem

          How can anyone help when you post nothing that is needed to help you? You haven't posted any facts, code, expected results or actual results.


          For all we know the procedure is returning the correct results; we have no way of knowing what the results should be or even what they really are since you didn't post them.


          You made a lot of statements but haven't posted anything to show that the statements are even true.


          Post facts that backup all the statements that you made and post the code you are using.

          • 2. Re: File.list() very odd problem

            I marked your answer as correct to be as snippy as your answer. This kind of answer was unwarranted. You could simply have asked specific questions. If you read and think about what I stated, the answers are there. I won't bother dignifying you with an answer.




            PS: I only read the first couple of lines of your answer - it was not worth my time to go on. I'll find another way around this.