Total Pageviews

Search This Blog

Sunday, August 15, 2010

Error message when you read an .XML file that has a large text field in Microsoft Dynamics AX 4.0

Processing larger files in AX, Please backup the registry before you do any modifications to it

SYMPTOMS




You read an XML file that has a large text field in Microsoft Dynamics AX 4.0. For example, the document size is 5432150 characters, and the large text field is 5429024 characters. In this scenario, the XmlElement.text function fails. Additionally, you receive the following error message:



Error in getting through from code: Shorthanded memory to getting through from script.

Stacktrace

(C)\Classes\XmlElement\text

(C)\Classes\PrismeXML_Base\traverse - line 58

(C)\Classes\PrismeXML_Base\run - line 12

(C)\Classes\PrismeXML_Base\interpret - line 67

(C)\Jobs\CallOIOInterpreter - line 15

 
CAUSE



This problem occurs because there is no more memory space available. By default, the size for the memory allocation in the Application Object Server (AOS) is set to 10 MB at installation. If your implementation requires manipulation of data elements over 10 MB, memory allocation fails. You may or may not see an error message if memory allocation fails when this limit is exceeded.

RESOLUTION




To resolve this problem, modify the maxbuffersize registry key on the client computer or the computer that is running the AOS server. Or, break the XML file into smaller sizes possibly 500 -1000 line items.

Note The following steps will bring your AOS server offline temporarily because of a service reset.

To modify the maxbuffersize registry subkey on the client computer, follow these steps:



1. Click Start, click Run, type Regedit, and then click OK.

2.Locate and then click the following registry subkey:

HKEY_CURRENT_USER\Software\Microsoft\Dynamics\4.0\Configuration\your current config name.

3.Set the value for the maxbuffersize registry key to the maximum message size in MB. Or, set the value to zero (0) to have no restriction on the size of documents.

4.Restart the client computer.

To modify the maxbuffersize registry key on the computer that is running the AOS server, follow these steps:

1.Click Start, click Run, type Regedit, and then click OK.

2.On the AOS server, open the server configuration settings:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dynamics Server\4.0\instance name\config name

3.Set the value for the maxbuffersize registry key to the maximum message size in MB.

4.Restart the AOS service.

No comments: