runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Add missing library

Open Hooghof opened this issue 1 year ago • 1 comments

If I use the groovy script in the flow below, I got this error message: Script_5eb2fc433ddabea8979024c1fa44d068.groovy: 15: unable to resolve class XmlParser @ line 15, column 21. def aggregatedXml = new XmlParser().parseText(request.getBody()) ^ 1 error

Use case Instance: next Tenant: Regression tests Group: Issues Flow: GroovyErrors3 Call url in inbound http and you will see the error message

Hooghof avatar Sep 04 '24 10:09 Hooghof

When you get an "unable to resolve X" it means it cannot execute the code, because there is something missing. This can have two reasons:

  1. Missing library
  2. Missing import

In this case it's the second. Just add:

import groovy.xml.*

On top of the script

skin27 avatar Sep 06 '24 07:09 skin27