ConfiguratorException: No configurator for root element <jobs>
See original GitHub issueI have the following error when trying to test the sample proposed in the How to create initial seed job section of the README.
Log
jenkins_1 | Jul 03, 2018 8:34:51 PM org.jenkinsci.plugins.casc.BaseConfigurator configure
jenkins_1 | INFO: Setting hudson.model.Hudson@3cab0202.systemMessage = Simple seed job example
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.InitReactorRunner$1 onTaskFailed
jenkins_1 | SEVERE: Failed ConfigurationAsCode.init
jenkins_1 | java.lang.Error: java.lang.reflect.InvocationTargetException
jenkins_1 | at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
jenkins_1 | at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
jenkins_1 | at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
jenkins_1 | at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065)
jenkins_1 | at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
jenkins_1 | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
jenkins_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
jenkins_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
jenkins_1 | at java.lang.Thread.run(Thread.java:748)
jenkins_1 | Caused by: java.lang.reflect.InvocationTargetException
jenkins_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jenkins_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jenkins_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jenkins_1 | at java.lang.reflect.Method.invoke(Method.java:498)
jenkins_1 | at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
jenkins_1 | ... 8 more
jenkins_1 | Caused by: org.jenkinsci.plugins.casc.ConfiguratorException: No configurator for root element <jobs>
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:427)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:351)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:324)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:178)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:147)
jenkins_1 | ... 13 more
jenkins_1 |
jenkins_1 | Jul 03, 2018 8:34:51 PM hudson.util.BootFailure publish
jenkins_1 | SEVERE: Failed to initialize Jenkins
jenkins_1 | hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
jenkins_1 | at hudson.WebAppMain$3.run(WebAppMain.java:250)
jenkins_1 | Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
jenkins_1 | at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
jenkins_1 | at jenkins.InitReactorRunner.run(InitReactorRunner.java:47)
jenkins_1 | at jenkins.model.Jenkins.executeReactor(Jenkins.java:1099)
jenkins_1 | at jenkins.model.Jenkins.<init>(Jenkins.java:904)
jenkins_1 | at hudson.model.Hudson.<init>(Hudson.java:86)
jenkins_1 | at hudson.model.Hudson.<init>(Hudson.java:82)
jenkins_1 | at hudson.WebAppMain$3.run(WebAppMain.java:233)
jenkins_1 | Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
jenkins_1 | at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
jenkins_1 | at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
jenkins_1 | at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
jenkins_1 | at jenkins.model.Jenkins$5.runTask(Jenkins.java:1065)
jenkins_1 | at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
jenkins_1 | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
jenkins_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
jenkins_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
jenkins_1 | at java.lang.Thread.run(Thread.java:748)
jenkins_1 | Caused by: java.lang.reflect.InvocationTargetException
jenkins_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jenkins_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jenkins_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jenkins_1 | at java.lang.reflect.Method.invoke(Method.java:498)
jenkins_1 | at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
jenkins_1 | ... 8 more
jenkins_1 | Caused by: org.jenkinsci.plugins.casc.ConfiguratorException: No configurator for root element <jobs>
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:427)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:351)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:324)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:178)
jenkins_1 | at org.jenkinsci.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:147)
jenkins_1 | ... 13 more
jenkins_1 |
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins cleanUp
jenkins_1 | INFO: Stopping Jenkins
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins$19 onAttained
jenkins_1 | INFO: Started termination
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins$19 onAttained
jenkins_1 | INFO: Completed termination
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins _cleanUpDisconnectComputers
jenkins_1 | INFO: Starting node disconnection
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins _cleanUpShutdownPluginManager
jenkins_1 | INFO: Stopping plugin manager
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins _cleanUpPersistQueue
jenkins_1 | INFO: Persisting build queue
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins _cleanUpAwaitDisconnects
jenkins_1 | INFO: Waiting for node disconnection completion
jenkins_1 | Jul 03, 2018 8:34:51 PM jenkins.model.Jenkins cleanUp
jenkins_1 | INFO: Jenkins stopped
Environment
- Tests done in Docker
- Jenkins version : 2.89.2
- Jenkins CasC version : 0.9-alpha
Steps to reproduce
# Create docker-compose.yml
cat << EOF > docker-compose.yml
version: "3"
services:
jenkins:
image: jenkins/jenkins:lts
ports:
- 8080:8080
environment:
- CASC_JENKINS_CONFIG=/var/jenkins_home/casc/jenkins.yml
volumes:
- ./data:/var/jenkins_home
EOF
# Create jenkins.yml from the documentation sample
cat << EOF > ./data/casc/jenkins.yml
jenkins:
systemMessage: "Simple seed job example"
jobs:
- >
multibranchPipelineJob('configuration-as-code') {
branchSources {
git {
remote('https://github.com/jenkinsci/configuration-as-code-plugin.git')
}
}
}
EOF
# Launch Jenkins
docker-compose up -d
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:17 (11 by maintainers)
Top Results From Across the Web
jenkinsci/configuration-as-code-plugin - Gitter
ConfiguratorException : No configurator for root element <jobs>". jobs: - script: > multibranchPipelineJob('configuration-as-code') { branchSources { git ...
Read more >Jenkins configuration-as-code plugin failing - Stack Overflow
ConfiguratorException : No configurator for the following root elements jobs at io.jenkins.plugins.casc.ConfigurationAsCode.
Read more >A wrong configuration of CasC yaml kill Jenkins startup
8 more Caused by: io.jenkins.plugins.casc.ConfiguratorException: No configurator for root element <credentials> at io.jenkins.plugins.casc.
Read more >io.jenkins.plugins.casc.ConfiguratorException.<init> java code ...
DataBoundConstructor} annotation * @throws ConfiguratorException Constructor not found */ private Constructor getDataBoundConstructor() throws ...
Read more >io.jenkins.plugins.casc.model.Mapping Java Examples
keySet(), ','); final String message = "Invalid configuration elements for type ... new ConfiguratorException(format("No configurator for the following root ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Job-dsl support is optional, if you don’t user a docker image with job-dsl plugin installed, or you don’t configure configuration-as-code to install it, you won’t get support for
jobs
in jenkins.yaml.My bad @casz.
I just realized my deployment was not using the tag I was building 😒. So of course it didn’t have
job-dsl:1.72
.It is working like a charm.
Thanks for your time and the hints and sorry for the inconvenience 😅