Chris,

There's definitely something funky going on there, the script doesn't
get the same classloader chain that the ScriptedRecordSetWriter (that
loads the script) does, instead it gets one with the standard NAR as
the parent instead of the scripting NAR. I'm looking into it now.

BTW for scripted component issues, you might be better off emailing
the dev list, there may be more folks in there familiar with the NiFi
code and scripting languages and such. Having said that, we can
maintain this thread until we get to the bottom of the issue.

Regards,
Matt

On Mon, May 11, 2020 at 3:47 AM Chris Herssens <[email protected]> wrote:
>
> Hello,
>
> I try to implement a groovy script where I'm using jsonOutput.
> With nifi 1.5 the script works, but If I'm try to use the same groovy script 
> with nifi 1.11.4, I get
> "unable to load FastStringService"
>
> example code :
>
> class GroovyRecordSetWriter implements RecordSetWriter {
> ....
> @Override
>  WriteResult write(Record r) throws IOException {
> ...
> def j = JsonOutput.toJson([name: 'John Doe', age: 42])
>  out.write(j.getBytes())
>
> ...
>
> Regards,
> Chris

Reply via email to