You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Jain, Neeraj" <ne...@wincor-nixdorf.com> on 2004/10/14 09:00:33 UTC
problem with file upload
Version: cocoon-2.1-M1.jar
I get classcastexception while attempting to upload a file. Following is the
stacktrace
at com.mypackage.FileUploadAction.act(FileUploadAction.java:275)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke
(ActTypeNode.java:133)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo
de.invokeNodes(AbstractParentProcessingNode.java:84)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNod
e.invoke(PreparableMatchNode.java:164)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo
de.invokeNodes(AbstractParentProcessingNode.java:108)
Line 275 in FileUploadAction.java is
PartInMemory filePart = (PartInMemory) request.get("uploadfile");
Re: problem with file upload
Posted by Scott Yeadon <sc...@anu.edu.au>.
Sounds like "uploadfile" isn't of the type you're casting it to - maybe
check where you're setting the "uploadfile" request attribute that it's
the object type you think it is...e.g. maybe you're storing in the
request a PartOnDisk but erroneously casting to PartInMemory when you do
the "get"?
Scott.
Jain, Neeraj wrote:
> Version: cocoon-2.1-M1.jar
>
> I get classcastexception while attempting to upload a file. Following
> is the stacktrace
>
> at com.mypackage.FileUploadAction.act(FileUploadAction.java:275)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke
> (ActTypeNode.java:133)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo
> de.invokeNodes(AbstractParentProcessingNode.java:84)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNod
> e.invoke(PreparableMatchNode.java:164)
> at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo
> de.invokeNodes(AbstractParentProcessingNode.java:108)
>
> Line 275 in FileUploadAction.java is
>
> PartInMemory filePart = (PartInMemory) request.get("uploadfile");
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org