java.lang.IllegalArgumentException: Null 'key' argument.

Atlassian JIRA | Sultan Maiyaki [Atlassian] | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    *User impact* can't generate report for plan with manual stage which was not started *Description* If plan has manual stage then buildDate field of AbstractResultSummary for this build is null until user manually run this particular stage. This field is used on report generator to sort data on report preparation phase. If this field is null for some records it can put record into incorrect place of collection. Then we iterate on collection expecting that first element is the earliest event in series. If at the middle of collection we found element with getStatDate() earlier than current RegularTimePeriod we can't find next corresponding RegularTimePeriod and go over 9999 years limit of JFreeChart. Also nullability of this field doesn't allow user to filter records by date on Reports UI The following appear in the log files: {noformat} java.lang.IllegalArgumentException: Null 'key' argument. at org.jfree.data.DefaultKeyedValues2D.getRowIndex(DefaultKeyedValues2D.java:184) at org.jfree.data.DefaultKeyedValues2D.setValue(DefaultKeyedValues2D.java:321) at org.jfree.data.DefaultKeyedValues2D.addValue(DefaultKeyedValues2D.java:304) at org.jfree.data.time.TimeTableXYDataset.add(TimeTableXYDataset.java:219) at com.atlassian.bamboo.reports.collector.AbstractTimePeriodCollector.writeCollaterToDataSet(AbstractTimePeriodCollector.java:202) at com.atlassian.bamboo.reports.collector.AbstractTimePeriodCollector.getDataset(AbstractTimePeriodCollector.java:83) at com.atlassian.bamboo.ww2.actions.reports.ViewReport.runReport(ViewReport.java:171) at com.atlassian.bamboo.ww2.actions.reports.ViewReport.doGenerate(ViewReport.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) {noformat} *Workaround* Run SQL query and rebuild indexes {code} update BUILDRESULTSUMMARY set BUILD_DATE=BUILD_COMPLETED_DATE where BUILD_DATE IS NULL and BUILD_TYPE='CHAIN'; {code} *Fix* We will skip AbstractResultSummary which have this field empty, because technically this build was not even started

    Atlassian JIRA | 2 years ago | Sultan Maiyaki [Atlassian]
    java.lang.IllegalArgumentException: Null 'key' argument.
  2. 0

    *User impact* can't generate report for plan with manual stage which was not started *Description* If plan has manual stage then buildDate field of AbstractResultSummary for this build is null until user manually run this particular stage. This field is used on report generator to sort data on report preparation phase. If this field is null for some records it can put record into incorrect place of collection. Then we iterate on collection expecting that first element is the earliest event in series. If at the middle of collection we found element with getStatDate() earlier than current RegularTimePeriod we can't find next corresponding RegularTimePeriod and go over 9999 years limit of JFreeChart. Also nullability of this field doesn't allow user to filter records by date on Reports UI The following appear in the log files: {noformat} java.lang.IllegalArgumentException: Null 'key' argument. at org.jfree.data.DefaultKeyedValues2D.getRowIndex(DefaultKeyedValues2D.java:184) at org.jfree.data.DefaultKeyedValues2D.setValue(DefaultKeyedValues2D.java:321) at org.jfree.data.DefaultKeyedValues2D.addValue(DefaultKeyedValues2D.java:304) at org.jfree.data.time.TimeTableXYDataset.add(TimeTableXYDataset.java:219) at com.atlassian.bamboo.reports.collector.AbstractTimePeriodCollector.writeCollaterToDataSet(AbstractTimePeriodCollector.java:202) at com.atlassian.bamboo.reports.collector.AbstractTimePeriodCollector.getDataset(AbstractTimePeriodCollector.java:83) at com.atlassian.bamboo.ww2.actions.reports.ViewReport.runReport(ViewReport.java:171) at com.atlassian.bamboo.ww2.actions.reports.ViewReport.doGenerate(ViewReport.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) {noformat} *Workaround* Run SQL query and rebuild indexes {code} update BUILDRESULTSUMMARY set BUILD_DATE=BUILD_COMPLETED_DATE where BUILD_DATE IS NULL and BUILD_TYPE='CHAIN'; {code} *Fix* We will skip AbstractResultSummary which have this field empty, because technically this build was not even started

    Atlassian JIRA | 2 years ago | Sultan Maiyaki [Atlassian]
    java.lang.IllegalArgumentException: Null 'key' argument.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Null 'key' argument.

      at org.jfree.data.DefaultKeyedValues2D.getRowIndex()
    2. jfreechart
      TimeTableXYDataset.add
      1. org.jfree.data.DefaultKeyedValues2D.getRowIndex(DefaultKeyedValues2D.java:184)
      2. org.jfree.data.DefaultKeyedValues2D.setValue(DefaultKeyedValues2D.java:321)
      3. org.jfree.data.DefaultKeyedValues2D.addValue(DefaultKeyedValues2D.java:304)
      4. org.jfree.data.time.TimeTableXYDataset.add(TimeTableXYDataset.java:219)
      4 frames
    3. com.atlassian.bamboo
      ViewReport.doGenerate
      1. com.atlassian.bamboo.reports.collector.AbstractTimePeriodCollector.writeCollaterToDataSet(AbstractTimePeriodCollector.java:202)
      2. com.atlassian.bamboo.reports.collector.AbstractTimePeriodCollector.getDataset(AbstractTimePeriodCollector.java:83)
      3. com.atlassian.bamboo.ww2.actions.reports.ViewReport.runReport(ViewReport.java:171)
      4. com.atlassian.bamboo.ww2.actions.reports.ViewReport.doGenerate(ViewReport.java:128)
      4 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. XWork
      DefaultActionInvocation.invokeAction
      1. com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)
      1 frame