You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ravishankar S <ra...@zworg.com> on 2001/09/04 13:08:26 UTC
Re: Strange NullPointerException Error in t4.0b7
"Paul Kofon" <pk...@hotmail.com> wrote:
>
> Hi All,
> I recently downloaded and installed Tomcat 4.0 b7. I found it to be quite
> responsive and remarkably faster than it's predecessors. However, my joy was
> short-lived when I found out an application which I had written and
> extensively tested under Tomcat 3.2.2. was not working in the T4.0 b7
> environment - I kept getting a NullPointerException error. I snooped around
> a bit and found out that the following piece of code was the culprit:
>
> File directory = new File("../webapps/humantrack/forms");
> File files[] = directory.listFiles();
>
> Now, here's the strange thing: "directory" isn't null but the array,
> files[], is! This code works without change in T3.2.2 as files[] doesn't
> return a null value. What's wrong?
>
> Regards,
>
> Paul
> paul did u try to catch the exception and have u initialized files to null initially???
>
> ravi
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
---------------------------------------
Get your free e-mail address @zworg.com