[JIRA] (JENKINS-37590) RuntimeException Error if you attempt to save a parameterized build with no parameters

7 views
Skip to first unread message

jhill@cloudbees.com (JIRA)

unread,
Aug 22, 2016, 11:14:05 AM8/22/16
to jenkinsc...@googlegroups.com
John Hill created an issue
 
Jenkins / Bug JENKINS-37590
RuntimeException Error if you attempt to save a parameterized build with no parameters
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2016/Aug/22 3:13 PM
Environment: Linux
Labels: jenkins
Priority: Minor Minor
Reporter: John Hill

1. Edit a job's configuration
2. Select the 'This build is parameterized' checkbox
3. Save the configuration

You get a RuntimeException and stack trace. A more user-friendly error would be preferable. It took me a few minutes to realize my mistake. Full stack trace:

javax.servlet.ServletException: java.lang.Error: Failed to instantiate class hudson.model.ParametersDefinitionProperty from {"specified":true}
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	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:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at com.cloudbees.jenkins.ha.HAHealthCheckFilter.doFilter(HAHealthCheckFilter.java:35)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
	at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:38)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at com.cloudbees.opscenter.client.plugin.OfflineSecurityRealmFilter._doFilter(OfflineSecurityRealmFilter.java:90)
	at com.cloudbees.opscenter.client.plugin.OfflineSecurityRealmFilter.doFilter(OfflineSecurityRealmFilter.java:67)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at com.cloudbees.opscenter.security.ClusterSessionFilter._doFilter(ClusterSessionFilter.java:69)
	at com.cloudbees.opscenter.security.ClusterSessionFilter.doFilter(ClusterSessionFilter.java:44)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:80)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	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:135)
	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:1652)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	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.Error: Failed to instantiate class hudson.model.ParametersDefinitionProperty from {"specified":true}
	at hudson.model.Descriptor.newInstance(Descriptor.java:598)
	at hudson.model.JobPropertyDescriptor.newInstance(JobPropertyDescriptor.java:72)
	at jenkins.model.OptionalJobProperty$OptionalJobPropertyDescriptor.newInstance(OptionalJobProperty.java:56)
	at hudson.model.JobProperty.reconfigure(JobProperty.java:187)
	at hudson.model.JobProperty.reconfigure(JobProperty.java:79)
	at hudson.util.DescribableList.rebuild(DescribableList.java:175)
	at hudson.model.Job.doConfigSubmit(Job.java:1211)
	at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:795)
	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:324)
	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	... 70 more
Caused by: java.lang.NullPointerException: ParameterDefinitions is null when this is a not valid value
	at hudson.model.ParametersDefinitionProperty.<init>(ParametersDefinitionProperty.java:75)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:525)
	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:777)
	at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:674)
	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474)
	at hudson.model.Descriptor.newInstance(Descriptor.java:590)
	... 89 more
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jhill@cloudbees.com (JIRA)

unread,
Aug 22, 2016, 11:16:03 AM8/22/16
to jenkinsc...@googlegroups.com

dbeck@cloudbees.com (JIRA)

unread,
Aug 29, 2016, 10:36:01 AM8/29/16
to jenkinsc...@googlegroups.com
Daniel Beck resolved as Duplicate
 
Change By: Daniel Beck
Status: Open Resolved
Resolution: Duplicate

andrew.bayer@gmail.com (JIRA)

unread,
Oct 12, 2016, 6:27:04 AM10/12/16
to jenkinsc...@googlegroups.com
Andrew Bayer reopened an issue
 

This is a different issue, so far as I can tell - https://github.com/jenkinsci/jenkins/commit/9b18d9bd5d58cc1c735303ac05eb2b653dffe44a seems to be what's triggering this.

Change By: Andrew Bayer
Resolution: Duplicate
Status: Resolved Reopened

andrew.bayer@gmail.com (JIRA)

unread,
Oct 12, 2016, 6:32:02 AM10/12/16
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-37590
 
Change By: Andrew Bayer
Status: Reopened In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Oct 12, 2016, 6:32:02 AM10/12/16
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Oct 12, 2016, 7:06:35 AM10/12/16
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Oct 12, 2016, 7:10:04 AM10/12/16
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Dec 19, 2016, 1:52:02 PM12/19/16
to jenkinsc...@googlegroups.com

So I think this is no longer an issue after JENKINS-33201 (fixed in 2.14, I believe) - there's still an error, but at least it's an explained one that covers this scenario as well as the one JENKINS-33201 is specifically targeting. Verifying now.

andrew.bayer@gmail.com (JIRA)

unread,
Dec 19, 2016, 1:57:01 PM12/19/16
to jenkinsc...@googlegroups.com

Nope, I'm wrong, it needs a fix here to get to far enough. Joy.

andrew.bayer@gmail.com (JIRA)

unread,
Jan 19, 2017, 7:40:01 PM1/19/17
to jenkinsc...@googlegroups.com

New PR up at https://github.com/jenkinsci/jenkins/pull/2723 since the previous one was dealing with a scenario that actually no longer exists.

scm_issue_link@java.net (JIRA)

unread,
Feb 9, 2017, 5:31:02 PM2/9/17
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
core/src/main/java/hudson/model/ParametersDefinitionProperty.java
http://jenkins-ci.org/commit/jenkins/8a8c4c20eb41204cd0535cc365a59ec6bad824ae
Log:
[FIXED JENKINS-37590] Return a null property if no parameters

At least part of the impetus for this issue was dealt with a while
back by a revert of PR #2444, but this gives us a better solution
anyway by guaranteeing we have a null property rather than one without
parameters.

andrew.bayer@gmail.com (JIRA)

unread,
Feb 17, 2017, 11:42:05 AM2/17/17
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Feb 17, 2017, 11:43:01 AM2/17/17
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages