• 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
Another dumb ERRest question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another dumb ERRest question


  • Subject: Another dumb ERRest question
  • From: Andrew Kinnie <email@hidden>
  • Date: Mon, 28 Mar 2011 15:36:08 -0400

I am again working on my ERRest based push notification server, and am having an issue with the framework.

I am using a version of Wonder from last week (the 5.4 branch), in eclipse 3.6 using a MySQL database on the development machine.

I looked at the example app, and copied the key functions from it (after wasting time trying to over-think it for a while going back to the easy method).

I can add a new object, it stores it in the database, but if I then attempt to delete it using the code:

@Override
public WOActionResults destroyAction() throws Throwable {
NotificationType type = notificationType();
type.delete();
editingContext().saveChanges();
return response(type, showFilter());
}

The "type" gets the delete message, saveChanges deletes the row in the database (the EO_PK_TABLE still shows it's pk as the current pk, which I gather is normal) but then the returned method 

response(type, showFilter());

crashes with an NPE deep in the guts of ERRest:

requestNode._fillInWithObjectAndFilter(obj, classDescription, keyFilter, delegate, new HashSet<Object>());

This is called in ERXRestRequestNode.java.  It appears (though I'm not completely sure) that the method is asking for the old object it just deleted, and there isn't one, because it just deleted it.  However, I copied this code directly from the example, so something somewhere is going wrong that doesn't go wrong in the example app.

So, I can avoid all this by just returning null, as the user will not actually need to get a response, but I thought I'd ask the question, what should I be doing here, and what might be going wrong?

Andrew
 _______________________________________________
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: Another dumb ERRest question
      • From: Farrukh Ijaz <email@hidden>
  • Prev by Date: Re: changed objects
  • Next by Date: AjaxExpansion inside a WORepetition?
  • Previous by thread: Re: changed objects
  • Next by thread: Re: Another dumb ERRest question
  • Index(es):
    • Date
    • Thread