Re: java.lang.ClassCastException when calling an EO's savechanges() method
Re: java.lang.ClassCastException when calling an EO's savechanges() method
- Subject: Re: java.lang.ClassCastException when calling an EO's savechanges() method
- From: WebObjects <email@hidden>
- Date: Fri, 13 May 2005 15:07:29 -0700
Tbltasks.java is the .java file created by EOModeler, on line 243-245 is:
public Number privateindicator() {
return (Number)storedValueForKey("privateindicator");
}
..."privateindicator" is an Attribute in the Entity
Better trace from console:
[2005-05-13 14:43:46 PDT] <main> Waiting for requests...
[2005-05-13 14:44:02 PDT] <WorkerThread1> java.lang.ClassCastException
at Tbltasks.privateindicator(Tbltasks.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.
java:54)
at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKe
yValueCoding.java:1160)
at
com.webobjects.eocontrol.EOCustomObject.valueForKey(EOCustomObject.java:1559
)
at
com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:
1407)
at
com.webobjects.eocontrol.EOCustomObject.validateForUpdate(EOCustomObject.jav
a:1490)
at
com.webobjects.eocontrol.EOEditingContext.validateTable(EOEditingContext.jav
a:2191)
at
com.webobjects.eocontrol.EOEditingContext.validateChangesForSave(EOEditingCo
ntext.java:2981)
at
com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEditingCo
ntext.java:3222)
at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:
3152)
at TestPage.updateRecord(TestPage.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.
java:54)
at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKe
yValueCoding.java:1160)
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey
(NSKeyValueCoding.java:1268)
at
com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1539)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCod
ing.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.va
lueForKeyPath(NSKeyValueCodingAdditions.java:212)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOK
eyValueAssociation.java:46)
at
com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmitButton
.java:70)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODyna
micGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup
.java:110)
at com.webobjects.appserver._private.WOForm.invokeAction(WOForm.java:82)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction(WODyna
micGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynamicGroup
.java:110)
at
com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java:945)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1166)
at com.webobjects.appserver.W[2005-05-13 14:44:02 PDT] <WorkerThread1>
<com.webobjects.appserver._private.WOComponentRequestHandler>: Exception
occurred while handling request:
java.lang.ClassCastException
OApplication.invokeAction(WOApplication.java:1375)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPre
paredPage(WOComponentRequestHandler.java:196)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPre
paredSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPre
paredApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(W
OComponentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WO
ComponentRequestHandler.java:432)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:13
06)
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)
on 5/13/05 14:56, Chuck Hill at email@hidden wrote:
>
> On May 13, 2005, at 2:52 PM, WebObjects wrote:
>
>> Updated Dev. platform using WO523Developer.dmg, now I get the error on
>> the
>> Dev platform as well as Deploy - I guess this is a 'good' thing. Here
>> is
>> the stack trace. I cut-n-pasted it from the browser window (it's not
>> pretty). Again, the error occurs when sending the context the
>> .saveChanges() command. Is this legible? (thanks!)
>>
> No, not really. Can you copy it out of the console in xCode?
>> File
>> Line#
>> Method
>> Package
>> Tbltasks.java
>> 244
>> privateindicator
>>
> What is on line 244 of Tbltasks.java?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden