Re: Classcastexception _EOCheapMutableArray
Re: Classcastexception _EOCheapMutableArray
- Subject: Re: Classcastexception _EOCheapMutableArray
- From: Chuck Hill <email@hidden>
- Date: Sat, 8 Dec 2007 17:28:36 -0800
On Dec 8, 2007, at 12:02 PM, Don Lindsay wrote:
Hello;
I turned debugging on and got the stack trace.
dwtm
Error: java.lang.ClassCastException:
com.webobjects.eocontrol._EOCheapCopyMutableArray
Reason: com.webobjects.eocontrol._EOCheapCopyMutableArray
Stack trace:
File Line# Method Package
WOToManyRelationship.java 345 updateSourceObject
com.webobjects.woextensions
You have the source for this component,
/Developer/Examples/JavaWebObjects/Source/JavaWOExtensions/
WOToManyRelationship.java
Chuck
WOToManyRelationship.java 421 setSelections
com.webobjects.woextensions
NativeMethodAccessorImpl.java NA invoke0 sun.reflect
NativeMethodAccessorImpl.java 39 invoke sun.reflect
DelegatingMethodAccessorImpl.java 25 invoke sun.reflect
Method.java 585 invoke java.lang.reflect
NSKeyValueCoding.java 688 setMethodValue com.webobjects.foundation
NSKeyValueCoding.java 1175 setValueInObject
com.webobjects.foundation
NSKeyValueCoding.java 1293 takeValueForKey
com.webobjects.foundation
WOComponent.java 1550 takeValueForKey com.webobjects.appserver
NSKeyValueCoding.java 519 takeValueForKey com.webobjects.foundation
NSValidation.java 733 validateTakeValueForKeyPath
com.webobjects.foundation
WOComponent.java 1273 validateTakeValueForKeyPath
com.webobjects.appserver
WOKeyValueAssociation.java 71 setValue
com.webobjects.appserver._private
WOBrowser.java 153 _fastTakeValuesFromRequest
com.webobjects.appserver._private
WOBrowser.java 168 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOConditional.java 41 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java 914 takeValuesFromRequest com.webobjects.appserver
WOComponentReference.java 97 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOComponentContent.java 20 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WOGenericContainer.java 17 takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java 914 takeValuesFromRequest com.webobjects.appserver
WOComponentReference.java 97 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOComponentContent.java 20 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOConditional.java 41 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java 914 takeValuesFromRequest com.webobjects.appserver
AbstractSubComponent.java 89 takeValuesFromRequest
com.psgs.dodig.dwtm
WOComponentReference.java 97 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOForm.java 70 takeValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest
com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java 914 takeValuesFromRequest com.webobjects.appserver
WOSession.java 1139 takeValuesFromRequest com.webobjects.appserver
WOApplication.java 1350 takeValuesFromRequest
com.webobjects.appserver
WOComponentRequestHandler.java 189 _dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java 287 _dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java 322
_dispatchWithPreparedApplication com.webobjects.appserver._private
WOComponentRequestHandler.java 358 _handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java 435 handleRequest
com.webobjects.appserver._private
WOApplication.java 1306 dispatchRequest com.webobjects.appserver
SPApplication.java 210 dispatchRequest com.webobjects.security
Application.java 124 dispatchRequest com.psgs.dodig.dwtm
WOWorkerThread.java 173 runOnce com.webobjects.appserver._private
WOWorkerThread.java 254 run com.webobjects.appserver._private
Thread.java 613 run java.lang
Thanks
Don
On Dec 8, 2007, at 1:40 PM, Don Lindsay wrote:
Hello Chuck;
All I get is :
Application: dwtm
Error: java.lang.ClassCastException:
com.webobjects.eocontrol._EOCheapCopyMutableArray
Reason:
Stack trace:
File Line# Method Package
NA : Non applicable, JIT activated
No stack trace at all. I don't know why.
Don
On Dec 8, 2007, at 12:51 PM, Chuck Hill wrote:
On Dec 8, 2007, at 8:26 AM, Don Lindsay wrote:
Hello;
I recently picked up an old application from about a year
ago. When I click save on any of my edit pages I get a
classcastexception in WOComponentRequestHandler while handing
java.lang.ClassCastException:
com.webobjects.eocontrol._EOCheapCopyMutableArray.
The code that is executed is very basic when save is clicked:
try{
WXDebug.println(20,"AbstractPage.java:saveChanges(): getting
editing context");
ec = session().defaultEditingContext();
WXDebug.println(20,"AbstractPage.java:saveChanges(): Saving
changes to the editing context");
ec.saveChanges();
} catch( Exception e) {
WXDebug.println(10, "An Error Occurred in
AbstractPage.java:saveChanges() error:"+e.getMessage());
errorMessage = "An Error Occurred While Saving, changes may not
have saved!: " + e.getMessage();
e.printStackTrace();
Do we get to see the stack trace? This is a guessing game?
} finally {
WXDebug.println(25,"AbstractPage.java:saveChanges(): return
page to user");
WXDebug.println(25,"**AbstractPage.java:saveChanges(): Done");
return this;
}
Has anyone else seen this?
OK, I will guess. When you write _EOCheapMutableArray you
probably mean _EOCheapCopyMutableArray. Copying and pasting
exception messages and stack traces is soooo much more useful
than transcribing and misspelling them. Just a hint.
_EOCheapCopyMutableArray is used by EOF to implement to-many
relationships. If you are getting a class cast:
1. You have a bug in your code (if only we had the stack trace...)
2. There is a bug in that to many component you are using (stack
trace...)
3. You are violating the EOF Commandments and EOF is in a
confused state
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-
The+EOF+Commandments
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific 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:
40mac.com
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
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