Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

groovy.lang.MissingMethodException for unknown method for step Misc > Execute Script #3959

dhorowitz15 ·

I'm getting the following error when running a job:

18:22:06,124 ERROR - Step 'master>Output QB Schedules' is failed: groovy.lang.MissingMethodException: No signature of method: script15296197260431596178797.dev() is applicable for argument types: (java.lang.String) values: [N]
Possible solutions: run(), run(), grep(), any(), dump(), every()
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at script15296197260431596178797.run(script15296197260431596178797.groovy:14)
at com.pmease.quickbuild.plugin.basis.BasisPlugin$30.evaluate(BasisPlugin.java:365)
at com.pmease.quickbuild.DefaultScriptEngine.evaluate(DefaultScriptEngine.java:305)
at com.pmease.quick...

Since this doesn't appear to be any method I'm calling within my script, I don't know what this is all about. Where is this method called from, and at what point am I passing this string when I shouldn't be?

I've tried this both with and without the recursive function and it's the same error, and I've also tried that same recursive function in another build without the error, so it doesn't appear to be that. That would be my only thought as to what that generated method would be.

This is the code in question:

groovy:

import com.pmease.quickbuild.persistence.*;
import com.pmease.quickbuild.model.Configuration;






def buildId = "${vars.getValue('buildId')}";
def env = "NA";
def PD = "N";
dev var1 = "N";

def del = "${vars.getValue('delimiter')}"



def outputString = 'Job Name' + del + 'Job URL'      + del + 'Schedule'                + del + 'ENV' + del + 'PD' + del + "var1" + del + "Trigger Steps"
//           child.toString() + del + child.getUrl() + del + child.schedule.toString() + del +  env  + del +  PD  + del +  var1  + del + triggeredConfigList


SessionManager.openSession();

Configuration getEnv(Configuration c) {
    cParent = c.getParent();
    
    if (cParent.getName() == "Config1" || cParent.getName() == "Config2" || cParent.getName() == "Config3") {
        return cParent;
    } else if (cParent.getName() == "RootConfig") {
        return null;
    } else {
        return getEnv(cParent);
    }
}

try {
  def level1 = system.configurationManager.load(buildId);
  logger.info(level1)
  for (child in level1.getDescendents()) {
    child.findNotifications(true).each {
        it.getReceivers().each {
            if(it == "aString") {
                PD = "Y";
            }
            if(it == "example@domain.com") {
                var1 = "Y";
            }
        }
    }
    


    envObj = getEnv(child)
    if (envObj != null) {
       env = envObj.getName()
    }



    for (childStep in child.getSteps()) {
      def triggeredConfigList;
      if (childStep.value instanceof com.pmease.quickbuild.plugin.basis.TriggerBuildStep) {
          logger.info(child.toString())
          logger.info(childStep.key)
          triggeredConfig = system.configurationManager.get(childStep.value.configurationPath)
          triggeredConfigList += childStep.key + "  " + childStep.value.configurationPath + "  " + triggeredConfig.toString() + "   ";
      } 
    }
    outputString += child.toString() + del + child.getUrl() + del + child.getSchedule().toString() + del + PD + del + var1 + del + triggeredConfigList + "\n"
  }
} finally {
  //new File("/opt/quickbuild/master-schedule/${vars.getValue("qb_client")}TriggeredSteps.csv").text = outputString
  logger.info(outputString)
  SessionManager.closeSession();
}

Thanks!

  • solved #2
  • replies 1
  • views 753
  • stars 0
dhorowitz15 ·

Never mind.

After over an hour of trying to troubleshoot this, I posted on the forums, and 2 minutes after posting, I realize I typed "dev" instead of "def" in one location. This was just a typing error.

Thanks!