It's all about the answers!

Ask a question

RTC : checkout failure: Unable to serialize

Raj Kumar (11) | asked May 14, 2:42 a.m.

below code is failing with error :
RTC : checkout failure: Unable to serialize
      Unable to serialize
(check the joined file for the complete error)

public class LRService extends RtcExtensionProvider{

 private Run<?, ?> currentBuild = null;

  public String getPathToLoadRuleFile(String workspaceUUID, String workspaceName, String buildResultUUID,
      Map<String, String> componentInfo, String repoURL, String userId, String password, PrintStream logger)
      throws IOException {

 Map<String, String> envVarsMap = currentBuild.getEnvVars();

String ServiceUrl = repoURL+........+getExcludeFilterValueFromCurrentBuiltObject; // get the string parameter value from Jenkins UI

  public boolean isApplicable(Run<?, ?> build) {
    this.currentBuild = build;
    return true;

I got to know the above code is not thread safe.As for storing any instance variables,  only one extension object exists, multiple threads could end up overwriting the instance variable values.

But my Question is how to handle this with above code. I want t access build objects values inside getPathToLoadRuleFile{} extension method 

Be the first one to answer this question!

Register or to post your answer.