commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konrad Piersdorfer" <Konrad.Piersdor...@gmx.at>
Subject Re: [fileupload] NullpointerException at DefaultFileItem.write()
Date Sat, 12 Nov 2005 04:11:18 GMT
i use fileupload 1.0. the rvn is 1.21.
line 442 is inside a finally-block and contains: out.close(); where out is a
BufferedOutputStream.
as out must be null, the root cause can only be in one of these two lines:

in = new BufferedInputStream(new FileInputStream(outputFile));
out = new BufferedOutputStream(new FileOutputStream(file));

file is the java.io.File, that i pass to the DefaultFileItem.write(File
file)-method.
it seems, that i don´t have permissions to create that file.

----- Original Message ----- 
From: "Martin Cooper" <martinc@apache.org>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Friday, November 11, 2005 6:55 PM
Subject: Re: [fileupload] NullpointerException at DefaultFileItem.write()


On 11/11/05, Konrad Piersdorfer <Konrad.Piersdorfer@gmx.at> wrote:
>
>
> i upload a jpeg and want to store it with DefaultFileItem.write(). the
> content-type is recognized, the path of the file i want to write is
> correct
> but the write method throws a NullPointerException in
> DefaultFileItem.write() at line 442.


It would help if you tell us which version of DefaultFileItem. The current
version in SVN is only 80 lines long... ;-) If you know what that line is,
that would be even better.

--
Martin Cooper

any ideas?
>
> regards,
> konrad
>
> --
> Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message