Open RIA Services User Support SubmitOperationBehavior InvokeCore input parameters sometimes null!  Viewed 19669 time(s), 3 post(s)., 2/26/2015 4:20:09 PM - by ROBALEXCLARK

ROBALEXCLARK 2/26/2015 4:20:09 PM

Following on from this post, many moons ago...

I'm still getting about 20 production errors on a daily basis (900) users. I've gradually put debugging code in to try and track down that sometimes the input[0] parameter in the InvokeCore method is null, as thrown in the following change to the InvokeCore code shows:

  protected override object InvokeCore(object instance, object[] inputs, out object[] outputs)
</br>            {
</br>  if(inputs[0] == null) throw new NullReferenceException("inputs[0] is null!");

                DomainService domainService = (DomainService)instance;
</br>                IEnumerable<ChangeSetEntry> changeSetEntries = (IEnumerable<ChangeSetEntry>)inputs[0];
</br>                outputs = ServiceUtility.EmptyObjectArray;


Any ideas on this? I've checked that client side is OK, but it seems that the input parameter is null when it hits the server.

This content has not been rated yet. 
76 Reputation 9 Total posts
ColinBlair 3/3/2015 5:41:28 PM

When you look in the WCF log, does the WCF log show that the ChangeSet is there? Since the ChangeSet is coming up null, I am wondering if there was a failure in deserializing the ChangeSet itself. Have you put a log point in the changeset deserialization to see what happens there?

This content has not been rated yet. 
1539 Reputation 130 Total posts
ROBALEXCLARK 3/4/2015 1:39:48 PM

Hi Colin, Thanks for the reply. I've tried message logging but as the submit changeset is not actually logged(?) it is hard to see what actually leaves the client. There are already lots of null checks in the OpenRiaServices.DomainServices.Client code. I have however just taken a closer look and realised that the changeset is rebuilt before it leaves the client in the EntityChangeSet.GetChangeSetEntries method(?). I've added another check to see if the created changeset is null and will deploy later this pm and monitor...

This content has not been rated yet. 
76 Reputation 9 Total posts