Skip to content

Commit 038b1a9

Browse files
authored
Merge pull request mendix#7429 from mendix/MVM-JSONStringLength9_24_17
Runtime setting for JSON string length in mapping 9.24.17
2 parents 9e7f6a3 + f511949 commit 038b1a9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

content/en/docs/refguide9/modeling/integration/mapping-documents/import-mappings.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,15 @@ Import mappings have the additional option to receive an incoming parameter. The
9595
To define a parameter for your mapping, click the parameter box and select the data type. You can also drag an entity into the parameter box.
9696

9797
You can use a parameter as a key or in a microflow to obtain objects. When you use an entity parameter, you can set associations to it. When you use a primitive parameter (string, integer, etc.), you can write the value to an attribute of an object that is being imported.
98+
99+
## 4 Troubleshooting{#troubleshooting}
100+
101+
If you are importing a very long JSON string, the underlying conversion library may not be able to handle it. In this case you will get a message similar to the following:
102+
103+
`com.mendix.systemvideinterfaces.MendixRuntimeException: com.fasterxm1.jackson.core.exc.StreamConstraintsException: String value length (20051112) exceeds the maximum allowed (20000000, from 'StreamReadConstraints.getMaxStringLength()')`
104+
105+
Mendix uses the Jackson Core XML library when performing the import mapping and this [has a limit of 20 million](https://javadoc.io/static/com.fasterxml.jackson.core/jackson-core/2.15.1/com/fasterxml/jackson/core/StreamReadConstraints.html#DEFAULT_MAX_STRING_LEN) characters (in earlier versions 5 million) in the JSON string.
106+
107+
In Mendix version 9.24.17 and above, you can override this using the [mapping.import.MaxJsonReadingLength](/refguide/custom-settings/#mapping.import.MaxJsonReadingLength) custom setting.
108+
109+
Mendix recommends that you only add this setting if you will be getting very long JSON strings as it may result in more memory usage.

content/en/docs/refguide9/runtime/custom-settings/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ The following custom settings can be configured:
7676
| <a id="TempPath" href="#TempPath">TempPath</a> | The location of the temporary files. | [deployment folder]\data\tmp |
7777
| <a id="TrackWebServiceUserLastLogin" href="#TrackWebServiceUserLastLogin">TrackWebServiceUserLastLogin</a> | Defines whether to update the web service user's `LastLogin` field on each login. When this happens a database update query has to be sent and this can have performance consequences on heavy load systems. When this setting is set to false, no database interaction is necessary. | true |
7878
| <a id="UploadedFilesPath" href="#UploadedFilesPath">UploadedFilesPath</a> | The location of the uploaded files. A valid path can be: `\\FileServer\CustomerPortalFiles`. | [deployment folder]\data\files |
79+
| <a id="mapping.import.MaxJsonReadingLength" href="#mapping.import.MaxJsonReadingLength">mapping.import.MaxJsonReadingLength</a> | The maximum length of the JSON string received from the remote which can be processed with import mapping. Use this setting when you expect a string which is longer than the default. See [Import Mappings](/refguide/import-mappings/#troubleshooting) for more information. <br />*This setting was introduced in Mendix version 9.24.17.* | 20000000 *(dependent on library version)* |
7980

8081
## 3 Log File Settings
8182

0 commit comments

Comments
 (0)