looks like fileInputStream  is a field on your page, but it isnt
serializable. so dont store it as a field

-igor


On 8/10/07, legol <[EMAIL PROTECTED]> wrote:
>
>
> Iam doing something like this:
>
> FileUpload upload = uploadField.getFileUpload();
>                 if(upload!=null) {
>                    try {
>                         fileInputStream = upload.getInputStream();
>                     }
>                     catch(IOException e) {
>                         logger.error(e.getMessage());
>                     }
>
> I want inputStream because i want to write file to database, but i get
> following errors:
>
> ERROR there was an error detaching the request from the session
> [EMAIL PROTECTED]
> wicket.WicketRuntimeException: Internal error cloning object. Make sure
> all
> dependent objects implement Serializable. Class:
> com.attachment.RMSTAttachmentWebPage
> at
> wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java
> :63)
> at wicket.Session.setAttribute(Session.java:952)
> more
> Caused by: java.io.NotSerializableException: java.io.ByteArrayInputStream
>                 at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
> more
>
> I tried also using upload.writeToTempFile() but i gets the same error with
> exception: java.io.NotSerializableException: java.io.FileInputStream
>
> When i use upload.getBytes() everything is OK till file is too large;
>
> Pls help, what am doing wrong?
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-uploading-files-tf4247384.html#a12087471
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to