Forum Discussion

Padmajakosana's avatar
Padmajakosana
New Contributor
2 years ago

REceiving Groovy Runtime Exception Error

groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File# . Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI] error at line: 5

 

Line 5: 

def InputFile=new File(com.eviware.soapui.SoapUI.globalProperties.getPropertyValue("GLB_Input_Data_Path" ))

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi,

    Th first thing I would check is the value returned from getPropertyFile.

    E.g.

     

    log.info(com.eviware.soapui.SoapUI.globalProperties.getPropertyValue("GLB_Input_Data_Path" ));

     

    The error is complaining that it can't decide whether you're passing in a String or URI.

    You could, and I haven't tested this, is ensuring the path is indeed a string.

     

    String filePath = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue("GLB_Input_Data_Path" );
    
    File file = new File(filePath);

     

    • Padmajakosana's avatar
      Padmajakosana
      New Contributor

      The process what I am doing is:

      After installation of SOAPUI, I imported the project, then generated tokens and click on Token from my project opens the Token, click Run is throwing this error.

      I mean to say that, the code and everything is pre-generated. We are just generating Tokens and running calls to verify the automation calls.

       

      Would any live agent be available to help me fix this issue? Please advise

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi,

     

    This is a community forum to help users of SmartBear products.  Most contributors don't work for SmartBear.

     

    You probably want raise a ticket with the support desk.