[jboss-user] [JBoss Seam] - Re: fileUpload component - Strange behavior
carlabramsson
do-not-reply at jboss.com
Fri Nov 9 08:05:28 EST 2007
We are having some strange and sporadic errors with the fileupload component in 1.2.0 and 1.2.1 GA too. We loose the viewstate sometimes on some of the pages.
After some debugging, it seems like the problem is with the class that parses the multipart-request and not the UI-component. We noticed this after first removing the UI-compoent from the page, still errors, and then removing the enctype="multipart/form-data" from the form tag. After this, the error never occurs.
Most of the time no exception is thrown, the multipart parser just don't return ANY params at all. Sometimes it only omits the viewstate param. Sometimes it works. Sometimes this expection is thrown:
18:13:08,233 ERROR [ExceptionFilter] exception root cause
| java.lang.ArrayIndexOutOfBoundsException: 2048
| at org.jboss.seam.web.MultipartRequest.checkSequence(MultipartRequest.java:466)
| at org.jboss.seam.web.MultipartRequest.parseRequest(MultipartRequest.java:333)
| at org.jboss.seam.web.MultipartRequest.getParam(MultipartRequest.java:507)
| at org.jboss.seam.web.MultipartRequest.getParameterValues(MultipartRequest.java:579)
| at javax.servlet.ServletRequestWrapper.getParameterValues(ServletRequestWrapper.java:188)
| [clipped]
|
(2048 is the size of the buffer in MultipartRequest, fishy...)
So it's very hard to reproduce as it seems like the error only occurs when the size of the post request is at a specific size and contains a specific number of parameters or something. But I have one view/entity that the error occurs on every time, this eases the debugging...
You are probably seeing the same error, the missing validateForm() could be a result of the viewstate-param not being parsed.
I'm going to use the MultipartRequest-class from Seam 2.0 since it's changed a bit and see if the problem goes away.
(Using Myfaces 1.1.5, Seam 1.2.1GA, Latest stable JBoss RichFaces/Ajax4JSF, removed tomahawk, put the seam-filter first)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103231#4103231
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103231
More information about the jboss-user
mailing list