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: Chuck Hill <email@hidden>
- Date: Fri, 13 May 2005 09:49:00 -0700
My guess is that you are using xCode, made some model or code changes,
and the build you deployed does not match the code that xCode is
running. That is my hands down feature. I hope it is fixed in 2.0.
If that sounds like the case, quick hexCode, rm -r build in your
project directory, and then open vexCode and rebuild and redeploy.
Chuck
On May 13, 2005, at 12:47 AM, WebObjects wrote:
I get no errors in dev mode (running in xcode on dev machine), but when
running the app on deployment (xserve) machine I get the following
error...
Application: TaskAlert
Error: java.lang.ClassCastException
Reason:
Stack trace:
File
Line#
Method
Package
NA : Non applicable, JIT activated
...Here is some of the classes code, the error occurs in
"updateRecord()",
it works in the IDE, but not on deployment:
public class TestPage extends WOComponent {
public Tbltasks myTask;
public TestPage(WOContext context) {
super(context);
}
public WOComponent updateRecord()
{
myTask.editingContext().saveChanges();
return null;
}
public void GetOneRecord() {
try{
EOEditingContext ec = session().defaultEditingContext();
ec.refreshAllObjects();
myTask = (Tbltasks)EOUtilities.objectMatchingKeyAndValue(ec,
"Tbltasks", "accountnumber", new Integer(10163));
} catch (Exception e) {
}
}
_______________________________________________
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