Xalan 2.7.1 and IIS 7 Cause HTML Truncation

1

I have a rather sticky problem for which I've done a lot of research but have had no luck in finding a solution.

I have a web application comprised of Tomcat servlets. Tomcat is running on a Windows 2008 R2 server and uses the Apache ISAPI Redirector 1.2.37 in IIS for redirection to/from Tomcat (uses ajp13).

My application manages a library of XML files. When requested by a client (browser), a servlet uses XSL to transform the XML file to HTML. The HTML is passed back to IIS thence back to the browser for display. Xalan is the implementation used for JAXP javax.xml.transform. This architecture has worked well for several years.

Recently, we upgraded from Xalan 2.7.0 to 2.7.1 and discovered the HTML for some XML files is being truncated when viewed in the browser.

After some trial-and-error investigation, here is what we know:

  1. Truncation only occurs when the source XML file is > ~1.7 MB.
  2. The HTML is truncated at the same location every time. (buffer size issue??)
  3. I tried redirecting the output from Xalan directly to a file ... no truncation.
  4. Truncation only occurs when Xalan 2.7.1 is used with IIS 7

    Xalan 2.7.1 + IIS 7 = truncation

    Xalan 2.7.1 + IIS 6 = no truncation

    Xalan 2.7.0 + IIS 7 = no truncation

  5. The ISAPI redirector log contains the following messages:

    [error] isapi_write_client::jk_isapi_plugin.c (1250): WriteClient failed with 534 (0x00000216)      
    
    [info] ajp_process_callback::jk_ajp_common.c (1945): Writing to client aborted or client network problems
    
    [info] ajp_service::jk_ajp_common.c (2607): (ajp13w) sending request to tomcat failed (unrecoverable), because of client write error (attempt=1)
    
    [info] service::jk_lb_worker.c (1400): service failed, worker ajp13w is in local error state
    
    [info] service::jk_lb_worker.c (1419): unrecoverable error 200, request failed. Client failed in the middle of request, we can't recover to another instance.
    
    [info] HttpExtensionProc::jk_isapi_plugin.c (2257): service() failed because client aborted connection
    

Given items 4 and 5 above, it is not clear who is the culprit (IIS, the redirector, Xalan, or Tomcat ... or all of them).

Any suggestions will be wonderfully appreciated.

xml
tomcat
iis-7
xalan
ajp
asked on Stack Overflow Oct 18, 2012 by ssmith • edited Oct 19, 2012 by Nightfirecat

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0