• 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 10:12:55 -0700


On May 13, 2005, at 10:08 AM, WebObjects wrote:

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)


You would think that, but you would be wrong. Trust me, I've seen your exact situation before. The .woa directory in build/ is not exactly what xCode runs.


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.


No, it does not sound like that. It sounds like xCode playing head games with you.

Chuck


-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:
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: Making changes to EO after validation?
  • 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