Return-Path: X-Original-To: apmail-manifoldcf-dev-archive@www.apache.org Delivered-To: apmail-manifoldcf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9761F172E9 for ; Sun, 3 May 2015 22:24:06 +0000 (UTC) Received: (qmail 17435 invoked by uid 500); 3 May 2015 22:24:06 -0000 Delivered-To: apmail-manifoldcf-dev-archive@manifoldcf.apache.org Received: (qmail 17376 invoked by uid 500); 3 May 2015 22:24:06 -0000 Mailing-List: contact dev-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list dev@manifoldcf.apache.org Received: (qmail 17365 invoked by uid 99); 3 May 2015 22:24:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2015 22:24:06 +0000 Date: Sun, 3 May 2015 22:24:06 +0000 (UTC) From: "Karl Wright (JIRA)" To: dev@manifoldcf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CONNECTORS-1195) Exception thrown in Maximum Bandwidth Report MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CONNECTORS-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526054#comment-14526054 ] Karl Wright commented on CONNECTORS-1195: ----------------------------------------- When committed to trunk, can you also pull up the change to the dev_1x branch? Thanks! > Exception thrown in Maximum Bandwidth Report > --------------------------------------------- > > Key: CONNECTORS-1195 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1195 > Project: ManifoldCF > Issue Type: Bug > Components: Framework core, Framework crawler agent > Affects Versions: ManifoldCF 1.8.2, ManifoldCF 2.0.2 > Reporter: Kishore Kumar > > This exception occurs when the _bytecount_ value returned is double instead of the expected long value. > Exception > {code} > 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.(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) > {code} > A quick fix for this issue is to convert the _bytecount_ value to double instead of long, > {code} > double byteCount = Converter.asDouble(row.getValue("bytecount")); > double bandwidth = (byteCount) * 1000.0 / intervalMilliseconds; > {code} > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)