Controller fails to start with CasC if the bundle defines templated items based on a Pipeline Catalog

Last Reviewed:2025-09-08()
1 minute readKnowledge base

Issue

After upgrading to 2.504.3.28224, CloudBees CI fails to load if the CasC bundle defines templated items based on a Pipeline Catalog with the following error.

2025-08-01 06:34:05.750+0000 [id=51] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed Bootstrap.initialize com.cloudbees.jenkins.plugins.casc.CasCException: Templated job 'my-templated-job' must be defined in the same folder or a subfolder of its model: pipelineTemplateCatalog folderPathContext folder-1/ at PluginClassLoader for cloudbees-casc-items-commons//com.cloudbees.jenkins.plugins.casc.items.types.FolderItem$FolderItemFactory.checkTemplateFolderConstraint(FolderItem.java:262) at PluginClassLoader for cloudbees-casc-items-commons//com.cloudbees.jenkins.plugins.casc.items.types.FolderItem$FolderItemFactory.instanceFromYAML(FolderItem.java:222) at PluginClassLoader for cloudbees-casc-items-commons//com.cloudbees.jenkins.plugins.casc.items.types.FolderItem$FolderItemFactory.instanceFromYAML(FolderItem.java:160) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.items.Items.parseItem(Items.java:309) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.items.Items.parseAndStop(Items.java:196) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.items.Items.<init>(Items.java:139) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.items.Items.<init>(Items.java:124) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.items.ItemsProcessor.create(ItemsProcessor.java:81) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.Bootstrap.applyItems(Bootstrap.java:183) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.Bootstrap.initializeItems(Bootstrap.java:99) at PluginClassLoader for cloudbees-casc-items-api//com.cloudbees.jenkins.plugins.casc.Bootstrap.initialize(Bootstrap.java:51) Caused: java.lang.reflect.InvocationTargetException ... Caused: java.lang.Error ...

Resolution

This issue is resolved in CloudBees CI version 2.516.3.29358.

Workaround

Temporarily, exclude templated items from your CasC bundle.

Tested product/plugin versions

  • CloudBees CI - managed controller version 2.504.3.28224

  • Cloudbees CasC Items Commons version 2.5318

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.