maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne (JIRA)" <j...@codehaus.org>
Subject [jira] (MCHECKSTYLE-205) NPE in CheckstyleReportGenerator.doFilesSummary:654 version 2.11 regression
Date Fri, 06 Dec 2013 14:00:45 GMT

    [ https://jira.codehaus.org/browse/MCHECKSTYLE-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336888#comment-336888
] 

Stephen Colebourne commented on MCHECKSTYLE-205:
------------------------------------------------

I can confirm this affected us to (trace below).

This commit fixed it by downgrading to v2.10
https://github.com/OpenGamma/OG-Platform/commit/cc98210696e36c9b79ecec99fa168846d8b1f3f4

To reproduce
- checkout OpenGamma: https://github.com/OpenGamma/OG-Platform.git
- checkout commit 8730fd93b3cc520098c7f08ea47a326817c98132 (on the develop branch)
- change to the 'projects' directory
- run 'mvn site'


build	05-Dec-2013 23:02:42	[INFO] Generating "Checkstyle" report    --- maven-checkstyle-plugin:2.11
build	05-Dec-2013 23:03:10	[INFO] 
build	05-Dec-2013 23:03:10	[INFO] ------------------------------------------------------------------------
build	05-Dec-2013 23:03:10	[INFO] Reactor Summary:
build	05-Dec-2013 23:03:10	[INFO] 
build	05-Dec-2013 23:03:10	[INFO] OG-Platform-Public ................................ FAILURE
[2:37.697s]
build	05-Dec-2013 23:03:10	[INFO] OG-TimeSeries ..................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Util ........................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Analytics ...................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Core ........................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Master ......................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-FinancialTypes ................................. SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Security ....................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-LiveData ....................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Provider ....................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Engine ......................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Financial ...................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Web ............................................ SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-UtilDB ......................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-MasterDB ....................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-EngineDB ....................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Component ...................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Bloomberg ...................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Integration .................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Client ......................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] OG-Server ......................................... SKIPPED
build	05-Dec-2013 23:03:10	[INFO] ------------------------------------------------------------------------
build	05-Dec-2013 23:03:10	[INFO] BUILD FAILURE
build	05-Dec-2013 23:03:10	[INFO] ------------------------------------------------------------------------
build	05-Dec-2013 23:03:10	[INFO] Total time: 2:40.267s
build	05-Dec-2013 23:03:10	[INFO] Finished at: Thu Dec 05 23:03:10 GMT 2013
build	05-Dec-2013 23:03:10	[INFO] Final Memory: 58M/769M
build	05-Dec-2013 23:03:10	[INFO] ------------------------------------------------------------------------
build	05-Dec-2013 23:03:10	[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site
(default-site) on project og-platform-public: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site
failed. NullPointerException -> [Help 1]
build	05-Dec-2013 23:03:10	org.apache.maven.lifecycle.LifecycleExecutionException: Failed
to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project
og-platform-public: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site
failed.
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
build	05-Dec-2013 23:03:10		at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
build	05-Dec-2013 23:03:10		at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
build	05-Dec-2013 23:03:10		at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
build	05-Dec-2013 23:03:10		at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
build	05-Dec-2013 23:03:10		at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
build	05-Dec-2013 23:03:10		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build	05-Dec-2013 23:03:10		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
build	05-Dec-2013 23:03:10		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build	05-Dec-2013 23:03:10		at java.lang.reflect.Method.invoke(Method.java:606)
build	05-Dec-2013 23:03:10		at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
build	05-Dec-2013 23:03:10		at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
build	05-Dec-2013 23:03:10		at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
build	05-Dec-2013 23:03:10		at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
build	05-Dec-2013 23:03:10	Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed.
build	05-Dec-2013 23:03:10		at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
build	05-Dec-2013 23:03:10		at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
build	05-Dec-2013 23:03:10		... 19 more
build	05-Dec-2013 23:03:10	Caused by: java.lang.NullPointerException
build	05-Dec-2013 23:03:10		at java.lang.String.compareTo(String.java:1139)
build	05-Dec-2013 23:03:10		at java.lang.String.compareTo(String.java:108)
build	05-Dec-2013 23:03:10		at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:290)
build	05-Dec-2013 23:03:10		at java.util.ComparableTimSort.sort(ComparableTimSort.java:171)
build	05-Dec-2013 23:03:10		at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
build	05-Dec-2013 23:03:10		at java.util.Arrays.sort(Arrays.java:472)
build	05-Dec-2013 23:03:10		at java.util.Collections.sort(Collections.java:155)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugin.checkstyle.CheckstyleReportGenerator.doFilesSummary(CheckstyleReportGenerator.java:650)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugin.checkstyle.CheckstyleReportGenerator.generateReport(CheckstyleReportGenerator.java:134)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugin.checkstyle.AbstractCheckstyleReport.generateMainReport(AbstractCheckstyleReport.java:462)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugin.checkstyle.AbstractCheckstyleReport.executeReport(AbstractCheckstyleReport.java:264)
build	05-Dec-2013 23:03:10		at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:196)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)
build	05-Dec-2013 23:03:10		at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
build	05-Dec-2013 23:03:10		at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
build	05-Dec-2013 23:03:10		at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
build	05-Dec-2013 23:03:10		... 20 more
                
> NPE in CheckstyleReportGenerator.doFilesSummary:654 version 2.11 regression
> ---------------------------------------------------------------------------
>
>                 Key: MCHECKSTYLE-205
>                 URL: https://jira.codehaus.org/browse/MCHECKSTYLE-205
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>    Affects Versions: 2.11, 2.12
>         Environment: maven-checkstyle-plugin v2.11 and 2.12-SNAPSHOT (as of 12/5/13).
Windows 7, JDK7.45 64 bit, maven 3.1
>            Reporter: Bob Fields
>
> This worked in release 2.10, no longer works in 2.11. Running mvn site against a large
project with a parent pom with many subprojects (though no code in the parent project) (andromda
v3.5-SNAPSHOT, from sourceforge). Maven output:
> [INFO] Generating "Checkstyle" report    --- maven-checkstyle-plugin:2.12-SNAPSHOT
> [INFO] Starting audit...
> ... About 6000 files ...
> Audit done.
> [INFO] There are 4777 checkstyle errors.
> .... And no additional troubleshooting information, even in debug mode ...
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site)
on project andromda: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site
failed. NullPointerException -> [Help 1]
> Caused by: java.lang.NullPointerException
> 	at java.lang.String.compareTo(String.java:1139)
> 	at java.lang.String.compareTo(String.java:108)
> 	at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:290)
> 	at java.util.ComparableTimSort.sort(ComparableTimSort.java:171)
> 	at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
> 	at java.util.Arrays.sort(Arrays.java:472)
> 	at java.util.Collections.sort(Collections.java:155)
> 	at org.apache.maven.plugin.checkstyle.CheckstyleReportGenerator.doFilesSummary(CheckstyleReportGenerator.java:654)
> 	at org.apache.maven.plugin.checkstyle.CheckstyleReportGenerator.generateReport(CheckstyleReportGenerator.java:134)
> I built version 2.12-SNAPSHOT locally, the NPE still exists. Running with version 2.10
- no NPE. The code attempts to run Collections.sort on a null key in the ArrayList from checkstyle
results.getFiles().keySet(). This area of code was not modified in any of the previous revisions
going into release 2.11. The results Collection is populated from DefaultCheckstyleExecutor.executeChecks
calling sinkListener.addDirectory, but that method code also did not change over the last
year.
> This bug prevents us from using the latest checkstyle version. If the stack trace isn't
enough to be able to add an extra null value check in executeChecks, I could run in debug
mode and figure where the difference in values from 2.10 and 2.11 comes from, but it may be
a little while before I can get to that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message