In Spotfire, marking more than 50,000 rows to run an update on an on-demand data table throws the following error:
Could not load on-demand data for table '[table-name]'
Failed to execute data query: An error occurred while making the HTTP request to https://<your-spotfire-server>/spotfire/ws/QueryManagerService. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
Please check <Spotfire-Server-home>tomcat\logs\informationservices\server.log (or in older versions <Spotfire-Server-home>tomcat\logs\server.log) and confirm that the following error is also thrown on the server side:
WARN 2025-05-08T17:44:53,356+0200 [username, #B-767, #646663] cxf.phase.PhaseInterceptorChain: Interceptor for {http://www.springframework.org/schema/beans}QueryManagerService#{http://spotfire.tibco.com/ws/2008/11/im.xsd}openJobEx has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Maximum Number of Child Elements limit (50000) Exceeded
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:931) ~[cxf-rt-databinding-jaxb.jar:4.0.3]
...
Caused by: javax.xml.stream.XMLStreamException: Maximum Number of Child Elements limit (50000) Exceeded
If you see the above error, this means that Apache CXF (a Java framework for web services that is used by Spotfire Server) is trying to process an incoming XML message, the on-demand data table query, and, while parsing this query, it hits the maximum allowed number of XML elements — in this case, 50,000. This is a built-in Apache CXF security feature to protect against XML bomb attacks or accidental overload due to extremely large XML data payloads.
The default max limit of 50000 elements can be increased using the following steps:
1. On Spotfire Server machine, open command prompt as administrator, then open for edit <Spotfire-Server-home>\tomcat\bin\service.bat file.
2. At the end of the file, on "--JvmOptions" line, add this option:
-Dorg.apache.cxf.stax.maxChildElements=1000000
(this will increase max child elements limit to 1,000,000)
For example, in Spotfire Server 14.0.7 service.bat, this JvmOptions line should look as follows:
--JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-XX:+AlwaysPreTouch;-XX:+UseG1GC;-XX:+DisableExplicitGC;-Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true;-Dorg.apache.catalina.startup.EXIT_ON_INIT_FAILURE=true;-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector;-Dlog4j.configurationFile=%CATALINA_BASE%\spotfire-config\log4j2-tomcat.xml;-Dlog4j.configurationFactory=com.spotfire.server.tomcat.log.integration.SpotfireConfigurationFactory;-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager;-Dorg.apache.cxf.stax.maxChildElements=1000000" ^
3. Next, run the following commands:
<Spotfire-Server-home>\tomcat\bin\service.bat remove
<Spotfire-Server-home>\tomcat\bin\service.bat install
4. Switch to <Spotfire-Server-home>\tomcat\spotfire-bin directory and run these commands:
config export-config -f
config config-external-information-services-process -A-Dorg.apache.cxf.stax.maxChildElements=1000000
config import-config -c "Modified org.apache.cxf.stax.maxChildElements"
5. Restart Spotfire Server service.
6. Login to Spotfire and run on-demand query again by marking more than 50K rows.
Comments
0 comments
Article is closed for comments.