...
To avoid this issue, you can define a maximum level of entity substitutions that the XML parser allows in the system. You do this using the entity expansion limit
as follows in the <APIM<ESB_HOME>/bin/wso2server.bat
file (for Windows) or the <APIM<ESB_HOME>/bin/wso2server.sh
file (for Linux/Solaris). The default entity expansion limit is 64000.
...