timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-34167] Add Build Step -> Execute Shell returns 500 from render #3024

Open timja opened 8 years ago

timja commented 8 years ago

When configuring a project, going to Add Build Step and selecting Execute Shell results in a 500 error with a stack trace like this (full trace attached):

Caused by: groovy.lang.MissingPropertyException: No such property: command for class: java.lang.String
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:63)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetPropertySafe(AbstractCallSite.java:333)
at hudson.tasks.Shell.config$_run_closure1.doCall(config.groovy:28)

Adding "Execute Windows batch command", "Invoke Ant", or "Invoke top-level Maven targets" works.

After adding an Ant under "Manage Jenkins," Invoke Ant fails with a similar issue:

Caused by: groovy.lang.MissingPropertyException: No such property: ant for class: java.lang.String
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
    at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:63)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetPropertySafe(AbstractCallSite.java:333)
    at hudson.tasks.Ant.config$_run_closure1_closure4_closure5.doCall(config.groovy:32)

Originally reported by jbramleycl, imported from: Add Build Step -> Execute Shell returns 500 from render
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 8 years ago

danielbeck:

Are you running Jenkins behind a reverse proxy? Does the URL to Jenkins configured in the global configuration match the URL you use to access Jenkins? Are there other resources returning HTTP error codes in then browser's console (e.g. when loading the form)?

timja commented 8 years ago

jbramleycl:

We're running apache as the frontend with tomcat behind it, so in the words of our SA, "technically yes." The URL in jenkins.model.JenkinsLocationConfiguration.xml is the URL I use to access the site. No other resources return 500 when loading the configuration form (or anywhere else that I've seen).