question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Class not found: io.jenkins.plugins.casc.model.Mapping

See original GitHub issue

Since the latest release I get this exception.

This is since 1.37, does not occur to my knowledge in 1.36. https://github.com/jenkinsci/configuration-as-code-plugin/compare/configuration-as-code-1.36...configuration-as-code-1.37

YAML lint of configuration file is fine.

org.yaml.snakeyaml.error.YAMLException: Class not found: io.jenkins.plugins.casc.model.Mapping
	at org.yaml.snakeyaml.constructor.Constructor.getClassForNode(Constructor.java:664)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.getConstructor(Constructor.java:322)
	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:331)
Caused: Can't construct a java object for tag:yaml.org,2002:io.jenkins.plugins.casc.model.Mapping; exception=Class not found: io.jenkins.plugins.casc.model.Mapping
 in /etc/jcasc/jenkins.yaml, line 1, column 1:
    jenkins:
    ^

	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:336)
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:230)
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:219)
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:173)
	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:157)
	at io.jenkins.plugins.casc.yaml.YamlUtils.loadFrom(YamlUtils.java:127)
	at io.jenkins.plugins.casc.yaml.YamlUtils.loadFrom(YamlUtils.java:112)
	at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:608)
	at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:291)
	at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:283)
Caused: 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:498)
	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
	at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:1133)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:50)
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:1166)
	at jenkins.model.Jenkins.<init>(Jenkins.java:966)
	at hudson.model.Hudson.<init>(Hudson.java:85)
	at hudson.model.Hudson.<init>(Hudson.java:81)
	at hudson.WebAppMain$3.run(WebAppMain.java:233)
Caused: hudson.util.HudsonFailedToLoad
	at hudson.WebAppMain$3.run(WebAppMain.java:250)

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository.

  • Jenkins version 2.222.1

  • Plugin version 1.37

  • OS ubuntu:bionic container in ubuntu bionic

Description

Upon fresh-install, I get this exception.

My plugins.txt file:

github-organization-folder
bitbucket-oauth
ws-cleanup
blueocean-git-pipeline
cloudbees-folder
cloudbees-bitbucket-branch-source
pipeline-model-definition
pipeline-stage-tags-metadata
pipeline-input-step
matrix-project
pipeline-github-lib
ssh-credentials
build-timeout
blueocean
matrix-auth
authorize-project
timestamper
credentials
github-branch-source
github
ssh-slaves
docker-plugin
git
bitbucket
hashicorp-vault-plugin
email-ext
configuration-as-code

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
timjacommented, Mar 29, 2020

I can reproduce this, downloaded latest version of jenkins, installed suggested plugins, installed jcasc,

added jenkins.yaml:

jenkins:
  systemMessage: testing
0reactions
tomlankhorstcommented, Mar 29, 2020

Thank you for your quick response. @timja 's minimal jenkins.yaml triggers this issue indeed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jenkinsci/configuration-as-code-plugin - Gitter
Hello all, I am trying to upgrade Jenkins to 2.361.2 and CasC plugin version of 1512.vb_79d418d5fc8. However, when I apply salt-state on a...
Read more >
ConfigurationAsCode (Configuration as Code Plugin 1569 ...
Defaults to use a file in the current working directory with the name 'jenkins.yaml' Add the environment variable CASC_JENKINS_CONFIG to override the default....
Read more >
io.jenkins.plugins.casc.model.Mapping#put - ProgramCreek.com
This page shows Java code examples of io.jenkins.plugins.casc.model. ... Failed to construct instance of class io.jenkins.plugins.casc.impl.configurators.
Read more >
Failed to initialize Jenkins - Stack Overflow
I started getting this error after upgrading the jenkins chart version to ... After try re-deploy your jenkins without pvc and plugins.
Read more >
io.jenkins.plugins.casc.ConfiguratorException java ... - Tabnine
File or URL cannot be parsed or do not exist."); } try { final Map<Source, String> issues = collectIssues(newSource); final JSONArray errors ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found