• 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: Fetch Specifications defined in the .eomodel *FIXED*
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetch Specifications defined in the .eomodel *FIXED*


  • Subject: Re: Fetch Specifications defined in the .eomodel *FIXED*
  • From: David Avendasora <email@hidden>
  • Date: Fri, 15 Feb 2008 17:51:05 -0500

Turns out all the logic was right, but I had SQL in my Fetch Specification on the model. WO thinks this is less secure (which it is, I guess) so it was kicking out this error:

[2008-02-15 16:53:14 EST] <WorkerThread0> Server exception: The fetchSpecification <SNIP/> was not allowed to execute on the server.  If your application needs to execute this method, the security needs to be relaxed by implementing the delegate method distributionContextShouldFetchObjectsWithFetchSpecification

The original server-side calls for this were catching the error and just returning null without putting anything in the log.

I rewrote the code from scratch with no error handling, which then put that in the server-side console.

Removing the SQL and just building the FetchSpecification using EntityModeler made the error go away.

The funny thing is that I can call this FetchSpecification using the normal invokeRemoteMethod() method of EOCustomObject, but if I try to use the invokeStatelessRemoteMethodWithKeyPath() method of EODistributedObjectStore, then it throws the above error.

Is this a bug?

Thanks Flor for all the help,

Dave

On Feb 15, 2008, at 3:28 PM, David Avendasora wrote:

Okay. Thanks for your help with this. It's driving me nuts. If I call the FS the "stateful" way, it works just fine, other than copying the EC back to the server, which I don't want. Very annoying.

I'll let you know when/if I figure it out.

Dave

On Feb 15, 2008, at 3:20 PM, Florijan Stamenkovic wrote:


On Feb 15, 2008, at 15:58, David Avendasora wrote:

and I get a nice "About to call FetchSpecification USDACalories" in the server console.

But it's returnning null. When I call the same FS using DBEdit (god, I'm going to miss that tool when I move to leopard) I get exactly what I'm expecting, which would be one instance of NutritionElementType that is the one for USDACalories.

So, what's different between my app pulling the FS from the EOModel in the Session class, and DBEdit doing it?

Who knows. Log every line of code in the server, or better yet, use Eclipse's debugger. Rebuild and re-launch your web app. Whatever. The principle works (I use it all the time), so you've got a bug somewhere.

F




 _______________________________________________
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: Fetch Specifications defined in the .eomodel *FIXED*
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >Re: Fetch Specifications defined in the .eomodel (From: David Avendasora <email@hidden>)
 >Re: Fetch Specifications defined in the .eomodel (From: Florijan Stamenkovic <email@hidden>)
 >Re: Fetch Specifications defined in the .eomodel (From: David Avendasora <email@hidden>)
 >Re: Fetch Specifications defined in the .eomodel (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: Fetch Specifications defined in the .eomodel
  • Next by Date: Re: Eclipse or WOLips java.lang.NullPointerException
  • Previous by thread: Re: Fetch Specifications defined in the .eomodel
  • Next by thread: Re: Fetch Specifications defined in the .eomodel *FIXED*
  • Index(es):
    • Date
    • Thread