Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-126

NullPointerException when executing jira-report with JIRA 3.13

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: jira
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I have installed the new JIRA 3.13 and I cannot generate the jira-report

      See stacktrace below:

      java.lang.NullPointerException
      at org.apache.maven.plugin.jira.JiraXML.endElement(JiraXML.java:131)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
      at org.apache.maven.plugin.jira.JiraXML.<init>(JiraXML.java:65)
      at org.apache.maven.plugin.jira.JiraReportGenerator.<init>(JiraReportGenerator.java:94)
      at org.apache.maven.plugin.jira.JiraMojo.executeReport(JiraMojo.java:251)
      at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
      at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
      at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:129)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:96)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)

        Activity

        Hide
        Régis DUTERTRE added a comment -

        See the new version tag of the generated RSS jira-results.xml file below, which may be the cause of NullPointerException :


        jira-results.xml

        <rss version="0.92">
        <channel>
        <title>JIRA Keynectis</title>
        <link>http://myhost.keynectis.com/secure/IssueNavigator.jspa?reset=true&amp;pid=12345&amp;resolution=1&amp;status=6&amp;sorter/field=created&amp;sorter/order=DESC&amp;sorter/field=priority&amp;sorter/order=DESC</link>
        <description>An XML representation of a search request</description>
        <language>en-us</language> <issue start="0" end="21" total="21"/>
        <build-info>
        <version>3.13</version>
        <build-number>330</build-number>
        <build-date>27-08-2008</build-date>
        <edition>Enterprise</edition>
        </build-info>

        <item>
        <title>[CORE-86] Bad Jurisdiction list for parent Area</title>
        <link>http://myhost.keynectis.com/browse/CORE-86</link>
        ...

        Show
        Régis DUTERTRE added a comment - See the new version tag of the generated RSS jira-results.xml file below, which may be the cause of NullPointerException : jira-results.xml <rss version="0.92"> <channel> <title>JIRA Keynectis</title> <link> http://myhost.keynectis.com/secure/IssueNavigator.jspa?reset=true&amp;pid=12345&amp;resolution=1&amp;status=6&amp;sorter/field=created&amp;sorter/order=DESC&amp;sorter/field=priority&amp;sorter/order=DESC </link> <description>An XML representation of a search request</description> <language>en-us</language> <issue start="0" end="21" total="21"/> <build-info> <version>3.13</version> <build-number>330</build-number> <build-date>27-08-2008</build-date> <edition>Enterprise</edition> </build-info> <item> <title> [CORE-86] Bad Jurisdiction list for parent Area</title> <link> http://myhost.keynectis.com/browse/CORE-86 </link> ...
        Hide
        Corentin Lonfils added a comment - - edited

        to fix the problem simply ignore the version number when the parent is not item in the class
        org\apache\maven\plugin\jira\JiraXML
        ...
        else if ( qName.equals( "version" ) && currentParent.equals( "item" ))

        { issue.setVersion( currentElement.toString().trim() ); }
        ...

        instead of

        else if ( qName.equals( "version" ) )
        { issue.setVersion( currentElement.toString().trim() ); }

        ...

        Show
        Corentin Lonfils added a comment - - edited to fix the problem simply ignore the version number when the parent is not item in the class org\apache\maven\plugin\jira\JiraXML ... else if ( qName.equals( "version" ) && currentParent.equals( "item" )) { issue.setVersion( currentElement.toString().trim() ); } ... instead of else if ( qName.equals( "version" ) ) { issue.setVersion( currentElement.toString().trim() ); } ...
        Hide
        Olivier Lamy added a comment -

        Fixed in rev 709990.
        SNAPSHOT deployed.
        As I can't test with this version of jira, if you have any trouble please reopen the issue.
        Thanks!

        Show
        Olivier Lamy added a comment - Fixed in rev 709990 . SNAPSHOT deployed. As I can't test with this version of jira, if you have any trouble please reopen the issue. Thanks!

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Régis DUTERTRE
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: