• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java.lang.ClassCastException when calling an EO's savechanges() method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.lang.ClassCastException when calling an EO's savechanges() method


  • Subject: Re: java.lang.ClassCastException when calling an EO's savechanges() method
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 13 May 2005 15:14:14 -0700

I've never used that data type.


On May 13, 2005, at 3:12 PM, WebObjects wrote:

One other thing, the 'external' type for this Attribute is 'bit', internal
type of 'NSNumber'. Is the casting issue possibly related to the 'pushing'
back of the NSNumber up to SQLserver's type of 'bit'?



on 5/13/05 15:07, WebObjects at email@hidden wrote:

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.j ava:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess orImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAcc essor.
java:54)
at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObjec t(NSKe
yValueCoding.java:1160)
at
com.webobjects.eocontrol.EOCustomObject.valueForKey(EOCustomObject.jav a:1559
)
at
com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject .java:
1407)
at
com.webobjects.eocontrol.EOCustomObject.validateForUpdate(EOCustomObje ct.jav
a:1490)
at
com.webobjects.eocontrol.EOEditingContext.validateTable(EOEditingConte xt.jav
a:2191)
at
com.webobjects.eocontrol.EOEditingContext.validateChangesForSave(EOEdi tingCo
ntext.java:2981)
at
com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEdi tingCo
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.j ava:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess orImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAcc essor.
java:54)
at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObjec t(NSKe
yValueCoding.java:1160)
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.value ForKey
(NSKeyValueCoding.java:1268)
at
com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java: 1539)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyVa lueCod
ing.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementat ion.va
lueForKeyPath(NSKeyValueCodingAdditions.java:212)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java: 1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInCompone nt(WOK
eyValueAssociation.java:46)
at
com.webobjects.appserver._private.WOSubmitButton.invokeAction(WOSubmit Button
.java:70)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction( WODyna
micGroup.java:101)
at
com.webobjects.appserver._private.WODynamicGroup.invokeAction(WODynami cGroup
.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(WODynami cGroup
.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._dispatchW ithPre
paredPage(WOComponentRequestHandler.java:196)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW ithPre
paredSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchW ithPre
paredApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleReq uest(W
OComponentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleRequ est(WO
ComponentRequestHandler.java:432)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.j ava:13
06)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThrea d.java
:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.ja va: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:
email@hidden


This email sent to email@hidden

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.concyse.com/
______________________________________________________________________


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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


  • Follow-Ups:
    • Re: java.lang.ClassCastException when calling an EO's savechanges() method
      • From: WebObjects <email@hidden>
References: 
 >Re: java.lang.ClassCastException when calling an EO's savechanges() method (From: WebObjects <email@hidden>)

  • Prev by Date: Re: java.lang.ClassCastException when calling an EO's savechanges() method
  • Next by Date: Re: java.lang.ClassCastException when calling an EO's savechanges() method
  • Previous by thread: Re: java.lang.ClassCastException when calling an EO's savechanges() method
  • Next by thread: Re: java.lang.ClassCastException when calling an EO's savechanges() method
  • Index(es):
    • Date
    • Thread