[JIRA] [multi-branch-project-plugin] (JENKINS-32237) Exception when trying to add Build Promotion process

1 view
Skip to first unread message

mjdetullio@gmail.com (JIRA)

unread,
Dec 30, 2015, 6:39:04 PM12/30/15
to jenkinsc...@googlegroups.com
Matthew DeTullio created an issue
 
Jenkins / Bug JENKINS-32237
Exception when trying to add Build Promotion process
Issue Type: Bug Bug
Assignee: Matthew DeTullio
Components: multi-branch-project-plugin
Created: 30/Dec/15 11:38 PM
Priority: Minor Minor
Reporter: Matthew DeTullio

I am not really sure how I want this use case to work, but I figured that you might care to know that there was an exception. I was using the promoted-builds plugin from https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin. I could a also provide a list of all the plugins, but I think this was the one that cause the exeption.

```
Error while serving http://0.0.0.0:8090/job/Build_MyCode/configSubmit
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleMultiBranchProject cannot be cast to hudson.model.AbstractProject
at hudson.plugins.promoted_builds.JobPropertyImpl.<init>(JobPropertyImpl.java:86)
at hudson.plugins.promoted_builds.JobPropertyImpl.<init>(JobPropertyImpl.java:51)
at hudson.plugins.promoted_builds.JobPropertyImpl$DescriptorImpl.newInstance(JobPropertyImpl.java:377)
at hudson.plugins.promoted_builds.JobPropertyImpl$DescriptorImpl.newInstance(JobPropertyImpl.java:353)
at hudson.util.DescribableList.rebuild(DescribableList.java:177)
at hudson.model.Job.doConfigSubmit(Job.java:1196)
at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:796)
at com.github.mjdetullio.jenkins.plugins.multibranch.AbstractMultiBranchProject.doConfigSubmit(AbstractMultiBranchProject.java:857)
... 73 more
```

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mjdetullio@gmail.com (JIRA)

unread,
Dec 30, 2015, 7:09:03 PM12/30/15
to jenkinsc...@googlegroups.com

mjdetullio@gmail.com (JIRA)

unread,
Dec 30, 2015, 7:33:01 PM12/30/15
to jenkinsc...@googlegroups.com
Matthew DeTullio updated an issue
Change By: Matthew DeTullio
Component/s: promoted-builds-plugin

mjdetullio@gmail.com (JIRA)

unread,
Dec 30, 2015, 7:33:01 PM12/30/15
to jenkinsc...@googlegroups.com
Matthew DeTullio updated an issue
Original reporter https://github.com/nabheet

I am not really sure how I want this use case to work, but I figured that you might care to know that there was an exception. I was using the promoted-builds plugin from https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin. I could a also provide a list of all the plugins, but I think this was the one that cause the exeption.

``` {code}
``` {code}

turturiellomartino@gmail.com (JIRA)

unread,
Jan 14, 2016, 8:02:01 PM1/14/16
to jenkinsc...@googlegroups.com
martino tu commented on Bug JENKINS-32237
 
Re: Exception when trying to add Build Promotion process

I am having the same issue, any update?

Thanks

manjiashok@googlemail.com (JIRA)

unread,
Feb 2, 2016, 12:26:03 PM2/2/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Apr 19, 2016, 7:57:01 AM4/19/16
to jenkinsc...@googlegroups.com
Oleg Nenashev assigned an issue to Oleg Nenashev
 
Change By: Oleg Nenashev
Assignee: Matthew DeTullio Oleg Nenashev

o.v.nenashev@gmail.com (JIRA)

unread,
Apr 19, 2016, 7:57:02 AM4/19/16
to jenkinsc...@googlegroups.com
Oleg Nenashev started work on Bug JENKINS-32237
 
Change By: Oleg Nenashev
Status: Open In Progress

o.v.nenashev@gmail.com (JIRA)

unread,
Apr 19, 2016, 8:20:01 AM4/19/16
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-32237
 
Re: Exception when trying to add Build Promotion process

Matthew DeTullio Actually this is a bug in MultiBranch project plugin.
When it draws the UI, it checks the base classes (e.g. MavenModuleSet instead of MavenMultiBranchProject). Promoted builds then considers the project type as "applicable" and proposes the JobProperty.

But the plugin is actually supports AbstractProjects only. When you save the project, an improper cast happens in Promoted Builds config handler. Any other JobProperties may get into the same issue.

I'll see if I can change the behavior in Promoted builds to support the case. I'll add better diagnostics at least.

scm_issue_link@java.net (JIRA)

unread,
Apr 20, 2016, 1:54:01 PM4/20/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Oleg Nenashev
Path:
pom.xml
src/main/java/hudson/plugins/promoted_builds/FakeParent.java
src/main/java/hudson/plugins/promoted_builds/JobPropertyImpl.java
src/main/java/hudson/plugins/promoted_builds/PromotedBuildAction.java
src/main/java/hudson/plugins/promoted_builds/PromotedProjectAction.java
src/main/java/hudson/plugins/promoted_builds/Promotion.java
src/main/java/hudson/plugins/promoted_builds/PromotionCondition.java
src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
src/main/java/hudson/plugins/promoted_builds/PromotionTargetAction.java
src/main/java/hudson/plugins/promoted_builds/PromotionTrigger.java
src/main/java/hudson/plugins/promoted_builds/Status.java
src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java
src/main/java/hudson/plugins/promoted_builds/conditions/ManualCondition.java
src/main/java/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition.java
src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/JobDslPromotionProcessConverter.java
src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/PromotionsContext.java
src/main/java/hudson/plugins/promoted_builds/integrations/jobdsl/PromotionsExtensionPoint.java
src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildParameterDefinition.java
src/main/java/hudson/plugins/promoted_builds/parameters/PromotedBuildRebuildParameterProvider.java
src/main/java/hudson/plugins/promoted_builds/util/ItemPathResolver.java
src/main/resources/hudson/plugins/promoted_builds/JobPropertyImpl/config.jelly
src/main/resources/hudson/plugins/promoted_builds/ManualPromotionBadge/index.jelly
src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/badge.jelly
src/main/resources/hudson/plugins/promoted_builds/PromotedBuildAction/index.jelly
src/main/resources/hudson/plugins/promoted_builds/PromotedProjectAction/index.jelly
src/main/resources/hudson/plugins/promoted_builds/Promotion/index.jelly
src/main/resources/hudson/plugins/promoted_builds/PromotionProcess/process-config.jelly
src/main/resources/hudson/plugins/promoted_builds/PromotionTrigger/config.jelly
src/main/resources/hudson/plugins/promoted_builds/PublisherImpl/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/Badge/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/GroovyCondition/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/Badge/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/ManualCondition/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionBadge/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/ParameterizedSelfPromotionCondition/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionBadge/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/SelfPromotionCondition/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/Badge/index.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/config.jelly
src/main/resources/hudson/plugins/promoted_builds/conditions/UpstreamPromotionCondition/index.jelly
src/main/resources/hudson/plugins/promoted_builds/tokenmacro/help.jelly
src/main/resources/index.jelly
src/test/java/hudson/plugins/promoted_builds/ConfigurationDoCheckTest.java
src/test/java/hudson/plugins/promoted_builds/PromotedBuildActionTest.java
src/test/java/hudson/plugins/promoted_builds/RemoteApiTest.java
http://jenkins-ci.org/commit/promoted-builds-plugin/adfdf61f362fb79cf2e04c14524f460a4d2f41d2
Log:
Migrate parent POM file, fix Javadoc and FindBugs (#89)

  • [new-parent-pom] Upgrade to the standalone plugin parent POM
  • [new-parent-pom] Fix javadoc errors
  • Add some missing CheckForNull annotations
  • [new-parent-pom] - Make the tests compilable and runnable
  • [new-parent-pom] - Escape all jelly files by default
  • [parent-pom-upgrade] - Fix Unit tests by enforcing data encoding
  • [FindBugs] - Process NPE warnings discovered by FindBugs
  • [parent-pom-upgrade] - Fix Javadoc after integrating pull requests
  • FindBugs - Fix the unchecked class cast, add dignostic messages (related to JENKINS-32237)
  • [parent-pom-upgrade] - Address comments from @armfergom . Java 6, etc.

o.v.nenashev@gmail.com (JIRA)

unread,
Jun 6, 2016, 10:27:02 AM6/6/16
to jenkinsc...@googlegroups.com

The issue is fixed on the Promoted Builds plugin side

o.v.nenashev@gmail.com (JIRA)

unread,
Jun 6, 2016, 10:27:02 AM6/6/16
to jenkinsc...@googlegroups.com
Oleg Nenashev resolved as Fixed
 
Change By: Oleg Nenashev
Status: In Progress Resolved
Resolution: Fixed

michaeldkfowler@gmail.com (JIRA)

unread,
Nov 22, 2016, 3:54:03 PM11/22/16
to jenkinsc...@googlegroups.com
Michael Fowler reopened an issue
 

I still get a warning saying adding a promotion to a multi branch project is not supported and it references this ticket. Was the fix ever merged? I don't a commit tagged with Jenkins-32237 in github.

Change By: Michael Fowler
Resolution: Fixed
Status: Resolved Reopened
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages