You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2007/11/09 15:53:08 UTC

[Myfaces][Trinidad] error while uploading a zip file

Hi, I'm using component tr:inputFile from Trinidad.
I successfully uploaded several kind of files to my application without 
problems.
When I try to upload a zip file, I get a server error, according to the 
following trace:

java.lang.NoClassDefFoundError: 
org/apache/commons/io/output/DeferredFileOutputStream
    at 
org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
    at 
org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
    at 
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
    at 
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
    at 
org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
...
Eclipse report the top error as occurring in 
org.apache.commons.fileupload.DefaultFileItemFactory from 
commons-fileupload-1.1.1.jar.
What else should I include in my project to account specifically for zip 
uploading and the missing class DeferredFileOutputStream ?

Thanks -- Renzo


Re: [Myfaces][Trinidad] error while uploading a zip file

Posted by Matthias Wessendorf <ma...@apache.org>.
source says

"uploadMaxFileSize" and "uploadThresholdSize".

So this is right:

http://wiki.apache.org/myfaces/Setup_For_File_Uploads

On Nov 9, 2007 4:58 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> here is all you need to know for Trinidad:
>
> http://myfaces.apache.org/trinidad/devguide/fileUpload.html
>
> and on Tomahawk... puh' ... hard to say. The "API" is total different.
> (the context-params are named different, in these two pages)
>
> Let me check the documentation, ahm... the source
>
> -Matthias
>
>
>
> On Nov 9, 2007 4:49 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
> >
> >  Done, indeed now it seems working well. One more jar for my collection,
> > there are already so many I don't know what they are for :-( .
> >  One more point, though: I'm having uploaded file threshold problems - I
> > know I have to configure my web.xml - but it seems there are documented two
> > different ways:
> >
> >  from myfaces docs: http://myfaces.apache.org/tomahawk/extensionsFilter.html
> >  from myfaces wiki: http://wiki.apache.org/myfaces/Setup_For_File_Uploads
> >
> >  since they refer to different filter classes - which is the right one ?
> >
> >
> >
> >
> >  Matthias Wessendorf wrote:
> >  try to just add commons-io
> >
> > On Nov 9, 2007 3:57 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> >
> >
> >  this isn't specific to myfaces/trinidad. this is caused by tomahawk
> >
> >
> > On Nov 9, 2007 3:53 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
> >
> >
> >  Hi, I'm using component tr:inputFile from Trinidad.
> > I successfully uploaded several kind of files to my application without
> > problems.
> > When I try to upload a zip file, I get a server error, according to the
> > following trace:
> >
> > java.lang.NoClassDefFoundError:
> > org/apache/commons/io/output/DeferredFileOutputStream
> >  at
> > org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
> >  at
> > org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
> >  at
> > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
> >  at
> > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
> >  at
> > org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
> > ...
> > Eclipse report the top error as occurring in
> > org.apache.commons.fileupload.DefaultFileItemFactory from
> > commons-fileupload-1.1.1.jar.
> > What else should I include in my project to account specifically for zip
> > uploading and the missing class DeferredFileOutputStream ?
> >
> > Thanks -- Renzo
> >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > mail: matzew-at-apache-dot-org
> >
> >
> >
> >
> >
> >
>
>
>
> --
>
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Re: [Myfaces][Trinidad] error while uploading a zip file

Posted by Matthias Wessendorf <ma...@apache.org>.
here is all you need to know for Trinidad:

http://myfaces.apache.org/trinidad/devguide/fileUpload.html

and on Tomahawk... puh' ... hard to say. The "API" is total different.
(the context-params are named different, in these two pages)

Let me check the documentation, ahm... the source

-Matthias


On Nov 9, 2007 4:49 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
>  Done, indeed now it seems working well. One more jar for my collection,
> there are already so many I don't know what they are for :-( .
>  One more point, though: I'm having uploaded file threshold problems - I
> know I have to configure my web.xml - but it seems there are documented two
> different ways:
>
>  from myfaces docs: http://myfaces.apache.org/tomahawk/extensionsFilter.html
>  from myfaces wiki: http://wiki.apache.org/myfaces/Setup_For_File_Uploads
>
>  since they refer to different filter classes - which is the right one ?
>
>
>
>
>  Matthias Wessendorf wrote:
>  try to just add commons-io
>
> On Nov 9, 2007 3:57 PM, Matthias Wessendorf <ma...@apache.org> wrote:
>
>
>  this isn't specific to myfaces/trinidad. this is caused by tomahawk
>
>
> On Nov 9, 2007 3:53 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
>
>  Hi, I'm using component tr:inputFile from Trinidad.
> I successfully uploaded several kind of files to my application without
> problems.
> When I try to upload a zip file, I get a server error, according to the
> following trace:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/io/output/DeferredFileOutputStream
>  at
> org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
>  at
> org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
>  at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
>  at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
>  at
> org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
> ...
> Eclipse report the top error as occurring in
> org.apache.commons.fileupload.DefaultFileItemFactory from
> commons-fileupload-1.1.1.jar.
> What else should I include in my project to account specifically for zip
> uploading and the missing class DeferredFileOutputStream ?
>
> Thanks -- Renzo
>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>
>
>
>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Re: [Myfaces][Trinidad] error while uploading a zip file

Posted by Matthias Wessendorf <ma...@apache.org>.
try to just add commons-io

On Nov 9, 2007 3:57 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> this isn't specific to myfaces/trinidad. this is caused by tomahawk
>
>
> On Nov 9, 2007 3:53 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
> > Hi, I'm using component tr:inputFile from Trinidad.
> > I successfully uploaded several kind of files to my application without
> > problems.
> > When I try to upload a zip file, I get a server error, according to the
> > following trace:
> >
> > java.lang.NoClassDefFoundError:
> > org/apache/commons/io/output/DeferredFileOutputStream
> >     at
> > org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
> >     at
> > org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
> >     at
> > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
> >     at
> > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
> >     at
> > org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
> > ...
> > Eclipse report the top error as occurring in
> > org.apache.commons.fileupload.DefaultFileItemFactory from
> > commons-fileupload-1.1.1.jar.
> > What else should I include in my project to account specifically for zip
> > uploading and the missing class DeferredFileOutputStream ?
> >
> > Thanks -- Renzo
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Re: [Myfaces][Trinidad] error while uploading a zip file

Posted by Matthias Wessendorf <ma...@apache.org>.
>From the filter:

        // For multipart/form-data requests
        if (FileUpload.isMultipartContent(httpRequest)) {
            extendedRequest = new MultipartRequestWrapper(httpRequest,
_uploadMaxFileSize, _uploadThresholdSize, _uploadRepositoryPath);
        }


so, sure the tomahawk Extension-Filter joins the party.

see:
http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/webapp/filter/ExtensionsFilter.java?revision=472792&view=markup

On Nov 9, 2007 4:14 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> that beast "MultipartRequestWrapper" is from tomahawk.
>
> Don't have to code for tomahawk on my box...
>
>
> On Nov 9, 2007 4:10 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
> >
> >  Thanks Matthias. I thought that Myfaces and Tomahawk are strictly
> > correlated, and I cannot find a Tomahawk-specific user mailing list.
> >  Is there any one ?
> >  Btw, I'm using Myfaces 1.1.5, Tomahawk 1.1.6, Trinidad 1.0.3.
> >
> >  -- Renzo
> >
> >
> >
> >  Matthias Wessendorf wrote:
> >  this isn't specific to myfaces/trinidad. this is caused by tomahawk
> >
> > On Nov 9, 2007 3:53 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
> >
> >
> >  Hi, I'm using component tr:inputFile from Trinidad.
> > I successfully uploaded several kind of files to my application without
> > problems.
> > When I try to upload a zip file, I get a server error, according to the
> > following trace:
> >
> > java.lang.NoClassDefFoundError:
> > org/apache/commons/io/output/DeferredFileOutputStream
> >  at
> > org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
> >  at
> > org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
> >  at
> > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
> >  at
> > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
> >  at
> > org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
> > ...
> > Eclipse report the top error as occurring in
> > org.apache.commons.fileupload.DefaultFileItemFactory from
> > commons-fileupload-1.1.1.jar.
> > What else should I include in my project to account specifically for zip
> > uploading and the missing class DeferredFileOutputStream ?
> >
> > Thanks -- Renzo
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Re: [Myfaces][Trinidad] error while uploading a zip file

Posted by Matthias Wessendorf <ma...@apache.org>.
that beast "MultipartRequestWrapper" is from tomahawk.

Don't have to code for tomahawk on my box...

On Nov 9, 2007 4:10 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
>  Thanks Matthias. I thought that Myfaces and Tomahawk are strictly
> correlated, and I cannot find a Tomahawk-specific user mailing list.
>  Is there any one ?
>  Btw, I'm using Myfaces 1.1.5, Tomahawk 1.1.6, Trinidad 1.0.3.
>
>  -- Renzo
>
>
>
>  Matthias Wessendorf wrote:
>  this isn't specific to myfaces/trinidad. this is caused by tomahawk
>
> On Nov 9, 2007 3:53 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
>
>
>  Hi, I'm using component tr:inputFile from Trinidad.
> I successfully uploaded several kind of files to my application without
> problems.
> When I try to upload a zip file, I get a server error, according to the
> following trace:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/io/output/DeferredFileOutputStream
>  at
> org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
>  at
> org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
>  at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
>  at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
>  at
> org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
> ...
> Eclipse report the top error as occurring in
> org.apache.commons.fileupload.DefaultFileItemFactory from
> commons-fileupload-1.1.1.jar.
> What else should I include in my project to account specifically for zip
> uploading and the missing class DeferredFileOutputStream ?
>
> Thanks -- Renzo
>
>
>
>
>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Re: [Myfaces][Trinidad] error while uploading a zip file

Posted by Matthias Wessendorf <ma...@apache.org>.
this isn't specific to myfaces/trinidad. this is caused by tomahawk

On Nov 9, 2007 3:53 PM, Renzo Tomaselli <re...@tecnotp.it> wrote:
> Hi, I'm using component tr:inputFile from Trinidad.
> I successfully uploaded several kind of files to my application without
> problems.
> When I try to upload a zip file, I get a server error, according to the
> following trace:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/io/output/DeferredFileOutputStream
>     at
> org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
>     at
> org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
>     at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
>     at
> org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
>     at
> org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
> ...
> Eclipse report the top error as occurring in
> org.apache.commons.fileupload.DefaultFileItemFactory from
> commons-fileupload-1.1.1.jar.
> What else should I include in my project to account specifically for zip
> uploading and the missing class DeferredFileOutputStream ?
>
> Thanks -- Renzo
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org