NetApp polling exception - com.netapp.nmsdk.client.ApiProtocolException: XML processing error during API call


Monitoring data for NetApp entities does not display.

The catalina.out log file contains error messages similar to

2014-01-05 22:29:13,462 ERROR [Monitoring]      : 10.10.x.x : netapp api protocol polling exception for : com.netapp.nmsdk.client.ApiProtocolException: XML processing error during API call disk-list-info to 10.10.x.x: ParseError at [row,col]:[1,1]
Message: JAXP00010001: The parser has encountered more than "64000" entity expansions in this document; this is the limit imposed by the JDK.


Known versions of Java that are affected:

- Java5 u55
- Java6 u65
- Java7 u45
- Java7 u51
- Java8




The above error occurs because in these versions of Java, the default entity expansion limit was set to 64000.

We can change this restriction by adding a system variable that Java can access.

This can be achieved by adding '-Djdk.xml.entityExpansionLimit=0' to the 'JAVA_OPTS' variable in the '/etc/tomcat/tomcat.conf' file

This Java setting should be added to the JAVA_OPTS line at the end just before the last curly bracket.


Original line: 

JAVA_OPTS="eval $MY_JAVA_OPTS /usr/bin/free -o -m | /usr/bin/grep Mem: | /usr/bin/awk '{print "-Xms256m -Xmx" int($2/4*3) "m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.util.Arrays.useLegacyMergeSort=true"}'"


Changed to:

JAVA_OPTS="eval $MY_JAVA_OPTS /usr/bin/free -o -m | /usr/bin/grep Mem: | /usr/bin/awk '{print "-Xms256m -Xmx" int($2/4*3) "m -XX:MaxPermSize=256m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.util.Arrays.useLegacyMergeSort=true -Djdk.xml.entityExpansionLimit=0"}'"

It is recommended that this Java setting be typed in manually. If you copy and paste this text, depending on your browser and operating system, these apostrophes and quotation marks are sometimes modified into more stylistic marks (similar to back ticks) that Java will not be able to interpret as valid in this file. It can also add unexpected linefeeds as well.


After this change is made, you will need to restart the tomcat service for the change to take effect:

vmturbo:~ # service tomcat restart

Have more questions? Submit a request