Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7817

java.lang.IllegalArgumentException on JBoss 5.0.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBossAS-5.0.1.GA
    • Fix Version/s: 6.0.0.M3
    • Component/s: Web (Tomcat) service
    • Labels:
      None
    • Environment:

      Windows Server 2008 + JBoss 5.1.0

      Description

      The code works well on JBoss 4.2.3 and JBoss 4.0.5. After we deploy the same application on JBoss 5. We encounter this issue. The stacktrace is:

      java.lang.IllegalArgumentException
      at java.nio.Buffer.position(Buffer.java:218)
      at org.apache.tomcat.util.buf.B2CConverter.convert(B2CConverter.java:84)
      at org.apache.catalina.connector.InputBuffer.realReadChars(InputBuffer.java:403)
      at org.apache.tomcat.util.buf.CharChunk.substract(CharChunk.java:383)
      at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:416)
      at org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:93)
      at com.filenet.bp8.api.util.Bp8XMLUtil.getDocumentFromReader(Bp8XMLUtil.java:92)
      at com.filenet.bp8.apps.server.servlet.Bp8ActionDispatcherServlet.doPost(Bp8ActionDispatcherServlet.java:67)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

      What we want to do is to get the content from HTTP Post request:
      In the servlet's doPost method, we invoked another utility class's getDocumentFromReader(Reader r) method:

      public static Document getDocumentFromReader(Reader r) throws IOException,SAXException {
      BufferedReader br = (BufferedReader) r;
      int i;
      StringBuffer sb = new StringBuffer();
      try {
      while ((i = br.read()) != -1)
      sb.append((char) i);

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rmaucher Remy Maucherat
                  Reporter:
                  jinjian jian jin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: