On Tue, May 5, 2009 at 1:52 PM, Jeanfrancois Arcand
<Jeanfrancois.Arcand_at_sun.com> wrote:
> Salut,
>
> Thomas Gideon wrote:
>>
>> I am still working on JFA's suggestion of how to use Grizzly's Comet
>> support to move file uploads to their own threads. Our application is
>> often used by an entire classroom at the same time and in a lab
>> exercise all of the students may attempt to upload larger multimedia
>> files over a slow link. We've definitely seen this consume our
>> available request processing threads in Glassfish.
>>
>> I have mostly plumbed together the necessary pieces but am having
>> trouble making my code work reliably under Glassfish 2.1. Sometimes
>> it works perfectly, other times it encounters errors in the Coyote
>> request classes.
>
> Do you have the exact error?
Yes, the most common error is:
[#|2009-05-05T14:18:26.745-0400|SEVERE|sun-appserver2.1|com.learningobjects.tgideon.upload.UploadPro
cessor|_ThreadID=19;_ThreadName=Thread-66;_RequestID=77375e21-72f9-42cd-9a4e-a10f829eb101;|java.lang
.NullPointerException
at com.sun.enterprise.web.connector.coyote.PwcCoyoteRequest.getFormHintFieldEncoding(PwcCoyo
teRequest.java:238)
at com.sun.enterprise.web.connector.coyote.PwcCoyoteRequest.setRequestEncodingFromSunWebXml(
PwcCoyoteRequest.java:204)
at com.sun.enterprise.web.connector.coyote.PwcCoyoteRequest.getCharacterEncoding(PwcCoyoteRe
quest.java:124)
at org.apache.coyote.tomcat5.CoyoteRequestFacade.getCharacterEncoding(CoyoteRequestFacade.ja
va:372)
at org.apache.commons.fileupload.servlet.ServletRequestContext.getCharacterEncoding(ServletR
equestContext.java:64)
at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.j
ava:809)
at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:323)
at org.apache.commons.fileupload.servlet.ServletFileUpload.getItemIterator(ServletFileUpload.java:148)
at com.learningobjects.tgideon.upload.UploadProcessor.run(UploadProcessor.java:95)
at java.lang.Thread.run(Thread.java:619)
|#]
Thomas