+ Start a Discussion
openaccessopenaccess 

class java.lang.OutOfMemoryError reported by update API call

Hi,

We are occasionally getting the above error message from SaveResult of update operation. The actual update operation is being applied to the object. The same error was observed from insert API result too.

What is the reason for such an error. We are using the sforce API from .NET.

Thanks

 

 

 

DevAngelDevAngel

Can you provide more info about the actual calls when this is happening?  The size of the updates (# of records, # of fields).

openaccessopenaccess

The error occured when we try to Update the Account object with a new name. Only one record was being updated with one field value.

Portions of Sample code:

WebReference.sObject updateObject = new WebReference.sObject();

updateObject.Id = idString;

updateObject.Any = new System.Xml.XmlElement[1];

System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

System.Xml.XmlElement xmlel = doc.CreateElement(Name);

xmlel.InnerText = Value;

updateObject.Any[0] = xmlel;

WebReference.SaveResult[] saveResults = binding.update(new WebReference.sObject[] { updateObject });

==> saveResults[0].success was false and saveResults[j].errors[0].message has the message.

Note that the same sequence of operations works fine now. I have noticed this error mainly on "ThursdaySep 22" when doing some testing. The error was not consistent. The same operation worked fine even on Sep 22 and no code changes were done to impact the behavior. The error was also being reported from some insert operations where a single record fo Account was inserted and only few feilds were being set. So most likely the size of the operation should not have caused the error.

 

Thanks

OpenAccess