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
|