slack-plugin: FATAL: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor since 2.0
Since the upgrade to 2.0 we have the following error for all our builds:
FATAL: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor
java.lang.AssertionError: class jenkins.plugins.slack.SlackNotifier$SlackJobProperty is missing its descriptor
at jenkins.model.Jenkins.getDescriptorOrDie(Jenkins.java:1223)
at hudson.model.JobProperty.getDescriptor(JobProperty.java:105)
at hudson.model.JobProperty.getDescriptor(JobProperty.java:79)
at hudson.model.Descriptor.toMap(Descriptor.java:973)
at hudson.model.Job.getProperties(Job.java:558)
at hudson.model.Build$BuildExecution.post2(Build.java:187)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Downgrade to 1.8.1 seems to solve the issue. Jenkins version: 1.652
See possible fix
edit by @samrocketman: See #191 for possible fixes for this issue.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 9
- Comments: 67 (36 by maintainers)
Commits related to this issue
- Latest upstream 2.x for slack plugin is currently expriencing issue : https://github.com/jenkinsci/slack-plugin/issues/188, which caused Jenkins from launching properly thus no builds. By reverting t... — committed to sleepyorion/build-wf by deleted user 11 years ago
- Added gradle to upload config (which will reproduce https://github.com/jenkinsci/slack-plugin/issues/188 ) — committed to lukosan/vagrant-ansible-ec2-jenkins-slack by deleted user 11 years ago
- Merge pull request #202 from HS2-SOLUTIONS/issue-188-missing-descriptor Fix #188 Fixes for configuration migration from 1.8 to 2.0 — committed to OwensCode/slack-plugin by kmadel 10 years ago
We encountered the same error, and we resolved it this way - it seems removing the Slack config from jobs via the UI does not cut it: On the Jenkins Server:
cd /var/lib/jenkins/jobsThen:find . -maxdepth 2 -type f -name 'config.xml'|xargs grep SlackJobPropertyResults:Edit each of these files and remove the
<jenkins.plugins.slack.SlackNotifier_-SlackJobProperty>blockGo to the Jenkins Manage screen and click on
Reload Configuration from Diskto ‘refresh’ its state.Request for feedback from others that upgraded to 2.0
For information, we had projects failing without any reference to
SlackJobPropertyin config.xml files. After investigation, this issue was triggered onInheritance projects. These projects also haveversions.xml.gzfile, this file contains older versions of the project configuration and these old configurations were including some slack configuration. We solved our issue by deletingversions.xml.gzfiles and reload configuration from disk (we did not need the previous project configurations).Using Job DSL causes the issue in this thread, which means the Job DSL is producing old configs. Anyone know how to directly write the XML via Job DSL?
Managed to repeat the issue with the multi-branch-project plugin installed. I don’t know much about this plugin, but it looks like it uses a template to create sub-projects for each branch in a code repository. It also centralizes the configuration for the sub-projects through the template configuration file. The jobs for the sub-projects are reported as having been migrated when Jenkins is started, but they fail with the errors reported. Looks like the template is not migrated, which is where the trouble starts.
A workaround to this issue is to manually update your template files.
If you have custom settings for sub-projects, you might need to update those as well, although in my brief testing it looked like they would actually be migrated when the Slack plugin was updated.