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 10:08:01 -0700
Thanks Chuck!, but I'm taking the entire 'Myapp.woa' file to the server,
blowing away the old one, then running the new build. I'm not sure if this
eradicates any possible oversight - but it 'would' seem to ensure that
what's running under deployment matches the dev copy one-for-one. (any
insight on this theory is always appreciated)
Would any of this point to the JDBC drivers (SQL Server)? I'm not familiar
with java.lang.ClassCastException bug chasing. I lean towards bad coding on
my part. But any hints where else to look is greatly appreciated.
-Bill
on 5/13/05 09:49, Chuck Hill at email@hidden wrote:
> 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
>>
_______________________________________________
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