Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-4294

Node-Availability-Report failing - possibly due to a parameter that should be marked notForPrompting



    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.8.8, 1.9.4
    • Component/s: Reports / Statsd
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Environment:
      OS X


      New JasperReports are failing in my branch with an unsupported parameter type (java.lang.Double). We currently don't support Double (which in itself is relatively easily fixed), but I suspect the parameter should be marked notForPrompting. Causes a ReportException thus:

      2010-12-10 16:59:34,479 DEBUG [9602137@qtp-13027694-14] JasperReportService: found promptable report parm AVAILABILITY_WARNING
      2010-12-10 16:59:34,479 ERROR [9602137@qtp-13027694-14] DefaultReportWrapperService: Report Exception when retrieving report parameters
      org.opennms.api.reporting.ReportException: Unsupported report parameter type java.lang.Double
      at org.opennms.reporting.jasperreports.svclayer.JasperReportService.getParameters(JasperReportService.java:241)

      Not terrifically well handled by the webUI (that needs to be fixed too). If the parameters are notForPrompting, they should be marked as such. Also the jasper reports code will not populate defaults as set here. Raising this as a bug as it will be an issue when we merge the rest of feature-report-api-parameters into master. The offending elements in NodeAvailabilityReport.jrxml around line 218:

      <parameter name="COMPANY_LOGO" class="java.lang.String">
      <parameter name="SURVEILLANCE_CATEGORY" class="java.lang.String">
      <parameter name="AVAILABILITY_WARNING" class="java.lang.Double">
      <defaultValueExpression><![CDATA[new Double("98.0")]]></defaultValueExpression>
      <parameter name="AVAILABILITY_CRITICAL" class="java.lang.Double">
      <defaultValueExpression><![CDATA[new Double("97.0")]]></defaultValueExpression>
      <parameter name="TIME_RANGE" class="java.lang.String">
      <defaultValueExpression><![CDATA["7 Days"]]></defaultValueExpression>
      <parameter name="START_TIME" class="java.sql.Timestamp">
      <defaultValueExpression><![CDATA[new java.sql.Timestamp(new java.util.Date().getTime() - (86400 * 7 * 1000))]]></defaultValueExpression>
      <parameter name="TIME_RANGE_DESCRIPTION" class="java.lang.String">


      + " from " + $P



      Suspect that the best way out for this is to add support for java.lang.Double, defaults and better error handling .




            • Assignee:
              desloge Donald Desloge
              jonathan@opennms.org Jonathan Sartin
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: