Forum Discussion

lauravachon's avatar
lauravachon
Contributor
5 years ago
Solved

getting groovy error when trying to run groovy script - EvictableCache

Any ideas how to fix this?

 

ERROR: java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.memoize.EvictableCache.getAndPut(Ljava/lang/Object;Lorg/codehaus/groovy/runtime/memoize/MemoizeCache$ValueProvider;)Ljava/lang/Object;

  • nmrao's avatar
    nmrao
    5 years ago
    Thank you for the details.

    This is just for you to try the workaround and see. Of course, it may not be supported by SmartBear.

    If an updated library is needed, rename the library under READYAPI_HOME/lib directory to something else so that it is not loaded and add the new library under READYAPI_HOME/bin/ext directory and restart the tool.

11 Replies

  • richie's avatar
    richie
    Community Hero
    Hi lauravachon,

    People are gonna struggle to help diagnose your issue without seeing the groovyscript that is failing.

    Can you provide the groovyscript?

    Cheers,

    Rich
    • lauravachon's avatar
      lauravachon
      Contributor

      This is really difficult since I would have to sanitize it. basically, I am trying to use a class from another jar

    • lauravachon's avatar
      lauravachon
      Contributor

       

      import java.time.LocalDate;

      import org.springframework.context.support.GenericApplicationContext
      import org.springframework.context.annotation.ClassPathBeanDefinitionScanner

      def ctx = new GenericApplicationContext()
      new ClassPathBeanDefinitionScanner(ctx).scan('')
      ctx.refresh()

      log.info ctx.beanDefinitionCount

      • nmrao's avatar
        nmrao
        Champion Level 3
        Please provide more details:
        1. version of readyapi
        2. version & external jar files used
        3. jdk version
        4. what are you trying to achieve in the script?