Overriding the Java thread stack size

If large XML or XSL files are passed to the XML server for processing, a stack overflow exception might occur. To prevent stack overflow exceptions from occurring, you can increase the Java thread stack size to enable the XML server to process larger XML or XSL files.

About this task

The Java thread stack size is determined by the value of the java.thread.stack.size property. The java.thread.stack.size property is specified in the xmlserver.xml Ant script that starts the XML Server. The default value of the property, which is -Xss4m, sets the Java thread stack size to 4 Mb.

Procedure

To override the default value of the java.thread.stack.size property, when you start the XML server, use the -Djava.thread.stack.size build command syntax.
The command in the following example sets the value of the java.thread.stack.size property to -Xss8m, and therefore sets the Java thread stack size to 8 Mb:
ant -Djava.thread.stack.size="-Xss8m" -f xmlserver.xml