2 Replies Latest reply on May 9, 2005 12:37 PM by rauschuber

    IOException in CoyoteReader(Possibly Related to Tomcat Bug #

      Using JBoss 4.0.2(Tomcat 5.5), I'm getting this excpetion from a servlet:
      java.io.IOException
      at org.apache.catalina.connector.InputBuffer.reset(InputBuffer.java:439)
      at org.apache.catalina.connector.CoyoteReader.reset(CoyoteReader.java:121)
      at org.apache.catalina.connector.CoyoteReader.readLine(CoyoteReader.java:178)

      This servlet receives XML over HTTP, so I think it's related to this bug(Getting IOException when line length exceeds 4096):
      http://issues.apache.org/bugzilla/show_bug.cgi?id=24897

      Since the bug is marked as wontfix, what is an appropriate workaround for a servlet that receives an XML document longer than CoyoteReader allows? Putting in line breaks isn't an option since this is being called by our customer.

      Thanks,
      Chris

        • 1. Re: IOException in CoyoteReader(Possibly Related to Tomcat B

          Upon further inspection, I don't think that said bug is the cause after all since there aren't any lines in the post that exceed the length limit. I'm going to crank up the log level and see if I can find anything that will help diagnose this.

          • 2. Re: IOException in CoyoteReader(Possibly Related to Tomcat B

            I didn't find anything helpful in the log. Is there anything here that should have tipped me off?


            2005-05-09 11:10:14,703 DEBUG [httpclient.wire] >> "Content-type: text/xml[\r][\n]"
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String)
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[])
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
            2005-05-09 11:10:14,703 DEBUG [httpclient.wire] >> "User-Agent: Jakarta Commons-HttpClient/2.0final[\r][\n]"
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String)
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[])
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
            2005-05-09 11:10:14,703 DEBUG [httpclient.wire] >> "Host: localhost[\r][\n]"
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String)
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[])
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
            2005-05-09 11:10:14,703 DEBUG [httpclient.wire] >> "Content-Length: 38200[\r][\n]"
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.print(String)
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[])
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.writeLine()
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[])
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.write(byte[], int, int)
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.flushRequestOutputStream()
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Security checking request POST /servicebus
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[tools]' against POST /servicebus --> false
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[tools]' against POST /servicebus --> false
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[tools]' against POST /servicebus --> false
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.realm.RealmBase] Checking constraint 'SecurityConstraint[tools]' against POST /servicebus --> false
            2005-05-09 11:10:14,703 DEBUG [httpclient.wire] >> "[\r][\n]"
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.realm.RealmBase] No applicable constraint located
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Not subject to any constraint
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter EntityEnclosingMethod.writeRequestBody(HttpState, HttpConnection)
            2005-05-09 11:10:14,703 DEBUG [org.apache.catalina.core.StandardWrapper] Returning non-STM instance
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter PostMethod.hasRequestContent()
            2005-05-09 11:10:14,703 DEBUG [com.pointserve.snm.web.servicebus.ServiceBusServlet] begin:process
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter EntityEnclosingMethod.hasRequestContent()
            2005-05-09 11:10:14,703 DEBUG [com.pointserve.snm.web.servicebus.ServiceBusServlet] content type = text/xml
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter EntityEnclosingMethod.getRequestContentLength()
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter PostMethod.hasRequestContent()
            2005-05-09 11:10:14,703 DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter EntityEnclosingMethod.hasRequestContent()
            2005-05-09 11:10:14,718 DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] Using unbuffered request body
            2005-05-09 11:10:14,718 DEBUG [org.apache.commons.httpclient.HttpConnection] enter HttpConnection.getRequestOutputStream()
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> "<?xml version="1.0" encoding="UTF-8"?>[\n]"
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> "[\n]"
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> "<AddMultidayScheduleRequest xmlns="http://www.pointserve.com/Schema" xmlns:op="http://www.pointserve.com/OPSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.pointserve.com/Schema/Import.xsd ../Import.xsd" requestId="123456789012345678901234567890ab" schemaVersion="0.1" scheduleNow="true">[\n]"
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> " <ServiceCenterCompanySystemKey>2518</ServiceCenterCompanySystemKey>[\n]"
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> " <MultidayServiceOrder>[\n]"
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> " <ServiceCompanySystemKey>GPCREGRES</ServiceCompanySystemKey>[\n]"
            2005-05-09 11:10:14,718 DEBUG [httpclient.wire] >> " <MultidayScheduleCompanySystemKey>450033046</MultidayScheduleCompanySystemKey>[\n]"
            
            ....lots of XML...
            
            2005-05-09 11:10:15,281 DEBUG [httpclient.wire] >> " </FrequencyRequirement>[\n]"
            2005-05-09 11:10:15,281 DEBUG [httpclient.wire] >> " </MultidayServiceOrder>[\n]"
            2005-05-09 11:10:15,281 DEBUG [httpclient.wire] >> " <MultidayServiceOrder>[\n]"
            2005-05-09 11:10:15,281 DEBUG [httpclient.wire] >> " "
            2005-05-09 11:10:15,281 ERROR [com.pointserve.snm.web.servicebus.ServiceBusServlet] Process failed - java.io.IOException
            java.io.IOException
             at org.apache.catalina.connector.InputBuffer.reset(InputBuffer.java:439)
             at org.apache.catalina.connector.CoyoteReader.reset(CoyoteReader.java:121)
             at org.apache.catalina.connector.CoyoteReader.readLine(CoyoteReader.java:178)
             at com.pointserve.snm.web.servicebus.ServiceBusServlet.readXMLRequest(ServiceBusServlet.java:462)
             at com.pointserve.snm.web.servicebus.ServiceBusServlet.process(ServiceBusServlet.java:138)
             at com.pointserve.snm.web.servicebus.ServiceBusServlet.doPost(ServiceBusServlet.java:113)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
             at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
             at java.lang.Thread.run(Thread.java:534)
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] getResourceAsStream(META-INF/services/javax.xml.parsers.SAXParserFactory)
            2005-05-09 11:10:15,296 DEBUG [httpclient.wire] >> " <ServiceCompanySystemKey>GPCREGRES</ServiceCompanySystemKey>[\n]"
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] Searching local repositories
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] findResource(META-INF/services/javax.xml.parsers.SAXParserFactory)
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] --> Resource not found, returning null
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] Delegating to parent classloader unconditionally java.net.FactoryURLClassLoader@426e05
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] --> Returning stream from parent
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] loadClass(org.apache.xerces.jaxp.SAXParserFactoryImpl, false)
            2005-05-09 11:10:15,296 DEBUG [httpclient.wire] >> " <MultidayScheduleCompanySystemKey>160175596</MultidayScheduleCompanySystemKey>[\n]"
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] Searching local repositories
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] findClass(org.apache.xerces.jaxp.SAXParserFactoryImpl)
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] findClassInternal(org.apache.xerces.jaxp.SAXParserFactoryImpl)
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] --> Passing on ClassNotFoundException
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] Delegating to parent classloader at end: java.net.FactoryURLClassLoader@426e05
            2005-05-09 11:10:15,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] Loading class from parent
            


            Thanks,
            Chris