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

java.io.NotSerializableException: groovy.json.internal.LazyMap error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • pipeline
    • None

      Hi,
      When I use below method after parsing the JSON using JsonSlurper(), I am getting java.io.NotSerializableException: groovy.json.internal.LazyMap error.
      If I just try to print the values of the JSON, I am not getting any error

      Can someone please share the workaround for this. This is a blocker for us.

      def gitCheckOut(String wsPath, String url, String cred, String branch) {
      	try {
      		ws("$wsPath") {
      			git ([url: "$url", credentialsId: "$cred", branch: "$branch"])
      		}
      	} catch (Exception ex) {
      		echo ex.getMessage()
      		gitCoErrors = gitCoErrors + "$wsPath\n"
      	}
      }
      
      node("HOST1") {
      	gitCheckOut("$unixws","$gitUrl","gitCred","$gitBranch")
      }
      
      

            oleg_nenashev Oleg Nenashev
            anudeeplalam Anudeep Lalam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: