Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-1195

Exception thrown in Maximum Bandwidth Report

    XMLWordPrintableJSON

Details

    Description

      This exception occurs when the bytecount value returned is double instead of the expected long value.

      Exception

              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.jasper.JasperException: An exception occurred processing J
      SP page /maxbandwidthreport.jsp at line 754
      
      751:                            idBucketString = idBucketObject.toString();
      752:                        String startTimeString = org.apache.manifoldcf.ui.ut
      il.Formatter.formatTime(Converter.asLong(row.getValue("starttime")));
      753:                        String endTimeString = org.apache.manifoldcf.ui.util
      .Formatter.formatTime(Converter.asLong(row.getValue("endtime").toString()));
      754:                        long byteCount = Converter.asLong(row.getValue("byte
      count"));
      755:                        double bandwidth = ((double)byteCount) * 1000.0 / in
      tervalMilliseconds;
      756:
      757: %>
      .
      .
      .
      Caused by: java.lang.NumberFormatException: For input string: "160675266.5899"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.
      java:65)
              at java.lang.Long.parseLong(Long.java:589)
              at java.lang.Long.<init>(Long.java:965)
              at org.apache.manifoldcf.core.util.Converter.asLong(Converter.java:55)
              at org.apache.jsp.maxbandwidthreport_jsp._jspService(maxbandwidthreport_
      jsp.java:1250)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
      .java:388)
      

      A quick fix for this issue is to convert the bytecount value to double instead of long,

      double byteCount = Converter.asDouble(row.getValue("bytecount"));
      double bandwidth = (byteCount) * 1000.0 / intervalMilliseconds;
      

      if it is not expected to have bytecount as double then we need to change the query used in RepositoryHistoryManager.maxByteCountReport(..) which make som conditional check on datasize column of repohistory table.

      Attachments

        Activity

          People

            kishorekumar Kishore Kumar
            kishorekumar Kishore Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: