Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65656

Cannot add or edit a managed file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • None
    • Config File Provider v3.8.0, Jenkins v2.249.1

      Attempting to add a new managed file or edit an existing managed file leads to an error.  

       

      Adding a new file repro steps:

      Go to Manage Jenkins --> Managed Files --> Add a new Config -->  Managed script file --> Submit --> Submit

      Resulting error:

      Caused: java.lang.IllegalArgumentException: Failed to instantiate class org.jenkinsci.lib.configprovider.model.Config from

      {"stapler-class":"org.jenkinsci.plugins.managedscripts.ScriptConfig","id":"install_tanzu_cli","providerId":"org.jenkinsci.plugins.managedscripts.ScriptConfig","name":["Install tanzu cli","BUILD_NUM","VERSION"],"comment":"","content":"#!/bin/bash\n\n ... at org.jenkinsci.plugins.configfiles.ConfigFilesManagement.doSaveConfig(ConfigFilesManagement.java:144)   Similarly when editing an existing managed file the following error occurs: Caught unhandled exception with ID 5f3832e7-4bb2-4766-a08f-4c4fe4f63752Caught unhandled exception with ID 5f3832e7-4bb2-4766-a08f-4c4fe4f63752org.kohsuke.stapler.WrongTypeException: Got type array but no lister class found for type class java.lang.String at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:724) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:787)Caused: java.lang.IllegalArgumentException: Failed to convert the name parameter of the constructor public org.jenkinsci.plugins.managedscripts.ScriptConfig(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.List) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:789) at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)Caused: java.lang.IllegalArgumentException: Failed to instantiate class org.jenkinsci.lib.configprovider.model.Config from \{"stapler-class":"org.jenkinsci.plugins.managedscripts.ScriptConfig","id":"install_tkg_cli","providerId":"org.jenkinsci.plugins.managedscripts.ScriptConfig","name":["Install tkg cli","","BUILD_NUM","VERSION"],"comment":"","content":"#!/bin/bash\n\n...","":""}

            mramonleon Ramon Leon
            rhill Rusi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: