Re(2): java.lang.NullPointerException
Re(2): java.lang.NullPointerException
- Subject: Re(2): java.lang.NullPointerException
- From: "Robert Snyder" <email@hidden>
- Date: Fri, 26 Mar 2004 09:14:59 -0500
Chuck, et al,
We finally figured this one out. The issue came up due to a change in how
WOFileUpload works in 5.2.2. WO 5.2.2 had some changes made to
WOFileUpload where if the binding 'enctype' is set to "multipart/form-
data" but there's no WOFileUpload present inside the form, it now throws
a NullPointerException.
We have this binding present in the WOForm in StudentRegistrationPage.wo.
which is the page that is called after the create a new UserID page is
completed. The reason that we had this in the StudentRegistrationPage.wo.
was because this component has a child component, which may or may not
have a WOFileUpload. Since before 5.2 having this binding was absolutely
harmless if there's no WOFileUpload, we had added it for the case when a
WOFileUpload was needed in one of the forms.
Since we never did implement a file up load in the rest of the
application, our solution is to remove the binding
'enctype="multipart/form-data"' from the WOForm in the component
StudentRegistrationPage.wo
Hope this helps someone else who is bring an application forward from
earlier versions of WO.
Cheers.
Robert
On Thu, Mar 25, 2004, Chuck Hill wrote:
>Does this happen for every browser or just some? It seems to be
>throwing while parsing the content-disposition header. As you have
>changed nothing that suggests that a new version of some browser has a
>bug. However I don't understand why this would fail on one access path
>and work on another.
>
>
>On Mar 25, 2004, at 5:12 AM, Robert Snyder wrote:
>
>> I have an application that up until two weeks ago was running just
>> fine.
>> Then it started throwing the same error. As far as I know, nothing was
>> changed on the server, and I had not uploaded a new version.
>>
>> The application allows a person to register for courses. It also allows
>> them to create a new account and password. If they need to create a new
>> account, the click on a link on the initial login panel, get a new form
>> page that collects name, email, password, and password reminder
>> question
>> and answer.
>>
>> Once they have completed the create a new account page, the are taken
>> to
>> a more comprehensive biographic information page. However, the
>> application now throws the error when they try to go to the
>> biographical
>> information page. The same page works fine if you go to it from the
>> login
>> page.
>>
>> Here is the exception that is thrown:
>>
>> [2004-03-25 08:04:55 EST] <WorkerThread14>
>> java.lang.NullPointerException
>> at com.webobjects.appserver._private
>> .WOFileUploadSupport._parseContentDis
>> positionHeader(WOFileUploadSupport.java:493)
>> at com.webobjects.appserver.WOMultip
>> artIterator$WOFormData._initHeaders(WOMultipartIterator.java:469)
>> at com.webobjects.appserver.WOMultip
>> artIterator$WOFormData.<init>(WOMultipartIterator.java:402)
>> at com.webobjects.appserver.WOMultip
>> artIterator._nextFormData(WOMultipartIterator.java:308)
>> at com.webobjects.appserver.WOReques
>> t._getFormValuesFromMultipartFormData(WORequest.java:1704)
>> at com.webobjects.appserver.WORequest.formValues(WORequest.java:1392)
>> at
>> com.webobjects.appserver.WORequest.formValuesForKey(WORequest.java:
>> 877)
>> at
>> com.webobjects.appserver.WORequest.formValueForKey(WORequest.java:910)
>> at com.webobjects.appserver.WOReques
>> t.stringFormValueForKey(WORequest.java:933)
>> at com.webobjects.appserver._private
>> .WOInput.takeValuesFromRequest(WOInput.java:89)
>> at com.webobjects.appserver._private
>> .WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:81)
>> at com.webobjects.appserver._private
>> .WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:89)
>> at com.webobjects.appserver._private
>> .WOForm.takeValuesFromRequest(WOForm.java:70)
>> at com.webobjects.appserver._private
>> .WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:81)
>> at com.webobjects.appserver._private
>> .WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:89)
>> at com.webobjects.appserver.WOCompon
>> ent.takeValuesFromRequest(WOComponent.java:914)
>> at com.webobjects.appserver.WOSessio
>> n.takeValuesFromRequest(WOSession.java:1137)
>> at com.webobjects.appserver.WOApplic
>> ation.takeValuesFromRequest(WOApplication.java:1350)
>> at com.webobjects.appserver._private
>> .WOComponentRequestHandler._dispatchW
>> ithPreparedPage(WOComponentRequestHandler.java:189)
>> at com.webobjects.appserver._private
>> .WOComponentRequestHandler._dispatchW
>> ithPreparedSession(WOComponentRequestHandler.java:287)
>> at com.webobjects.appserver._private
>> .WOComponentRequestHandler._dispat[2004-03-25 08:04:55 EST]
>> <WorkerThread14> <com.webobjects.apps
>> erver._private.WOComponentRequestHandler>: Exception occurred while
>> handling request:
>> java.lang.NullPointerException
>> chWithPreparedApplication(WOComponentRequestHandler.java:322)
>> at com.webobjects.appserver._private
>> .WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.jav
>> a:358)
>> at com.webobjects.appserver._private
>> .WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java
>> :432)
>> at com.webobjects.appserver.WOApplic
>> ation.dispatchRequest(WOApplication.java:1306)
>> at com.webobjects.appserver._private
>> .WOWorkerThread.runOnce(WOWorkerThread.java:173)
>> at com.webobjects.appserver._private
>> .WOWorkerThread.run(WOWorkerThread.java:254)
>> at java.lang.Thread.run(Thread.java:552)
>>
>>
>> ____________________________________________
>>
>> Robert Snyder, Director
>> World Campus Data Management Services
>> The Pennsylvania State University
>> 105 Mitchell Building
>> University Park PA 16802
>> Phone: 814-865-0912 Fax: 814-865-4406
>> E-mail: email@hidden
>> URL: http://www.worldcampus.psu.edu/my.campus
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/
>webobjects-dev
>Do not post admin requests to the list. They will be ignored.
>
>
____________________________________________
Robert Snyder, Director
World Campus Data Management Services
The Pennsylvania State University
105 Mitchell Building
University Park PA 16802
Phone: 814-865-0912 Fax: 814-865-4406
E-mail: email@hidden
URL: http://www.worldcampus.psu.edu/my.campus
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.