[JIRA] [violations-plugin] (JENKINS-28880) Maven builds fail with "IllegalStateException: cannot change build result while in COMPLETED"

13 views
Skip to first unread message

martinro@java.net (JIRA)

unread,
Jun 12, 2015, 4:06:03 AM6/12/15
to jenkinsc...@googlegroups.com
martinro created an issue
 
Jenkins / Bug JENKINS-28880
Maven builds fail with "IllegalStateException: cannot change build result while in COMPLETED"
Issue Type: Bug Bug
Assignee: peterkittreilly
Components: violations-plugin
Created: 12/Jun/15 8:05 AM
Environment: OS: Windows
Priority: Critical Critical
Reporter: martinro

Problem here with Jenkins 1.609.1 mit Maven builds and violations are checked (and the violation limits are exceeded).
Maven integration plugin 2.10
Violation plugin 0.7.11

ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
java.lang.IllegalStateException: cannot change build result while in COMPLETED
at hudson.model.Run.setResult(Run.java:462)
at hudson.plugins.violations.ViolationsReport.setBuildResult(ViolationsReport.java:542)
at hudson.plugins.violations.hudson.maven.ViolationsMavenReporter.end(ViolationsMavenReporter.java:100)
at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:104)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:865)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:537)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

tomas.bjerre85@gmail.com (JIRA)

unread,
Jun 16, 2015, 10:06:20 AM6/16/15
to jenkinsc...@googlegroups.com

tomas.bjerre85@gmail.com (JIRA)

unread,
Jun 16, 2015, 10:06:24 AM6/16/15
to jenkinsc...@googlegroups.com
Tomas Bjerre started work on Bug JENKINS-28880
 
Change By: Tomas Bjerre
Status: Open In Progress

tomas.bjerre85@gmail.com (JIRA)

unread,
Jun 17, 2015, 2:59:01 PM6/17/15
to jenkinsc...@googlegroups.com
Tomas Bjerre commented on Bug JENKINS-28880
 
Re: Maven builds fail with "IllegalStateException: cannot change build result while in COMPLETED"

We can easily make the consequence less severe, by catching the IllegalStateException and just log it. Then the violation reports will still be populated. But still, the build result wont be UNSTABLE, but instead SUCCESSFUL.

https://github.com/jenkinsci/violations-plugin/pull/68

scm_issue_link@java.net (JIRA)

unread,
Jun 18, 2015, 4:44:02 AM6/18/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Tomas Bjerre
Path:
.travis.yml
build.sh
plugin-test/pom.xml
plugin-test/src/test/java/hudson/plugins/violations/ConfigurationWebTest.java
pom.xml
reset.sh
src/main/java/hudson/plugins/violations/ViolationsCollector.java
src/main/java/hudson/plugins/violations/ViolationsReport.java
src/main/java/hudson/plugins/violations/graph/SeverityTypeDataSet.java
src/main/java/hudson/plugins/violations/hudson/AbstractViolationsBuildAction.java
src/main/java/hudson/plugins/violations/hudson/maven/ViolationsMavenReporter.java
work/jobs/m2-freestyle-build/config.xml
work/jobs/m2-freestyle-site/config.xml
work/jobs/m2-freestyle-site/workspace/ear/pom.xml
work/jobs/m2-freestyle-site/workspace/ejbs/pom.xml
work/jobs/m2-freestyle-site/workspace/pom.xml
work/jobs/m2-freestyle-site/workspace/primary-source/pom.xml
work/jobs/m2-freestyle-site/workspace/projects/logging/.gitignore
work/jobs/m2-freestyle-site/workspace/servlets/servlet/pom.xml
work/jobs/m2-freestyle-site/workspace/servlets/servlet/src/main/java/root/project/FooBar.java
work/jobs/m2-m2-build/config.xml
work/jobs/m2-m2-build/workspace/servlets/servlet/src/main/java/root/project/FooBar.java
work/jobs/m2-m2-site/config.xml
work/jobs/m2-m2-site/workspace/ear/pom.xml
work/jobs/m2-m2-site/workspace/ejbs/pom.xml
work/jobs/m2-m2-site/workspace/pom.xml
work/jobs/m2-m2-site/workspace/primary-source/pom.xml
work/jobs/m2-m2-site/workspace/servlets/servlet/pom.xml
http://jenkins-ci.org/commit/violations-plugin/1c991520930ff4edcc83af1260de13d0ae001d74
Log:
Avoiding crash when setting Maven2 jobs to unstable in 1.609 #61 JENKINS-28880

  • Avoiding crash when setting Maven2 build to UNSTABLE. By simply catching the IllegalStateException. This is not the final solution. The build will still not be marked as unstable, instead of crashing (FAIL) it will succeed (SUCCESS). Instead of showing no violation results, it will show them.
  • Making the example projects compile
  • Testing example projects in web tests
  • Stepping up Jenkins version to 1.580.3
  • Adding Java 8 to Travis config
  • Using Firefox and Xvfb in Travis CI, HTMLUnit is a bit unpredictable

tomas.bjerre85@gmail.com (JIRA)

unread,
Jun 22, 2015, 1:12:03 PM6/22/15
to jenkinsc...@googlegroups.com
Tomas Bjerre stopped work on Bug JENKINS-28880
 
Change By: Tomas Bjerre
Status: In Progress Open

martin.roetzl@de-gmbh.com (JIRA)

unread,
Aug 3, 2016, 4:55:01 AM8/3/16
to jenkinsc...@googlegroups.com
martinro commented on Bug JENKINS-28880

Updated my installation to Jenkins v2.7.1,
Maven Integration plugin v2.13,
Violation plugin v0.7.11

Jenkins seems still to crash. Build ist marked als FAILED.
Violations checks not usable.

ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
java.lang.IllegalStateException: cannot change build result while in COMPLETED
	at hudson.model.Run.setResult(Run.java:459)
	at hudson.plugins.violations.ViolationsReport.setBuildResult(ViolationsReport.java:542)
	at hudson.plugins.violations.hudson.maven.ViolationsMavenReporter.end(ViolationsMavenReporter.java:100)
	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:104)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:859)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
project=hudson.maven.MavenModuleSet@23a0e0ff[0000-010 Java DE_Startcenter]
project.getModules()=[hudson.maven.MavenModule@2ac26c0f[0000-010 Java DE_Startcenter/0000-010:DE_Startcenter][0000-010 Java DE_Startcenter/0000-010:DE_Startcenter][relativePath:]]
project.getRootModule()=hudson.maven.MavenModule@2ac26c0f[0000-010 Java DE_Startcenter/0000-010:DE_Startcenter][0000-010 Java DE_Startcenter/0000-010:DE_Startcenter][relativePath:]
FATAL: cannot change build result while in COMPLETED
java.lang.IllegalStateException: cannot change build result while in COMPLETED
	at hudson.model.Run.setResult(Run.java:459)
	at hudson.plugins.violations.ViolationsReport.setBuildResult(ViolationsReport.java:542)
	at hudson.plugins.violations.hudson.maven.ViolationsMavenReporter.end(ViolationsMavenReporter.java:100)
	at hudson.maven.AbstractMavenBuilder.end(AbstractMavenBuilder.java:104)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:859)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

tomas.bjerre85@gmail.com (JIRA)

unread,
Aug 3, 2016, 5:13:03 AM8/3/16
to jenkinsc...@googlegroups.com

My opinion is that this plugin should be rewritten. Its just a waste of time to try to fix all the bugs.

https://github.com/jenkinsci/violations-plugin/issues/88

tomas.bjerre85@gmail.com (JIRA)

unread,
Aug 4, 2016, 6:43:02 AM8/4/16
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages