• 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
insertObject error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

insertObject error


  • Subject: insertObject error
  • From: vjc <email@hidden>
  • Date: Thu, 22 Dec 2005 20:55:17 -0500

Heylo,

I am trying to create a form that will add the values to my database.  The table's primary key, aid, is an auto increment column.  Whenever I fill all of the values in the form and hit submit to add the data to the database, I get the following error:

Application: OnTrack
Error: java.lang.IllegalArgumentException: attempt to insert a null object into this context
Reason: attempt to insert a null object into this context 

I have checked to make sure that I am not leaving out any fields that are not null.  As a matter of fact, the only field I am leaving out is the aid field.  Here is my data for the submit button:

public WOComponent addAnnouncement()
    {
        EOEditingContext ec = session().defaultEditingContext();
ec.insertObject(newAnnouncement);
ec.saveChanges();
newAnnouncement = new Announcement();
return null;
    }

I am confused and tired.  Any help is greatly appreciated.

Peace,

Vickie
 _______________________________________________
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: insertObject error
      • From: wojingo <email@hidden>
  • Prev by Date: Re: Cannot find service Error
  • Next by Date: Re: insertObject error
  • Previous by thread: Re: KeyValue coding for non WO classes
  • Next by thread: Re: insertObject error
  • Index(es):
    • Date
    • Thread