<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: unable to resolve class groovy.yaml.YamlSlurper in Nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379366#M243846</link>
    <description>&lt;P&gt;It could be NiFi only includes the core Groovy jar files and you may need to download the additional ones and add to the NiFi lib directory for the additional classes to be accessible.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2023 06:56:16 GMT</pubDate>
    <dc:creator>joseomjr</dc:creator>
    <dc:date>2023-11-22T06:56:16Z</dc:date>
    <item>
      <title>unable to resolve class groovy.yaml.YamlSlurper in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379363#M243844</link>
      <description>&lt;P&gt;Using Nifi 1.23.2 I'm not able to resolve the YamlSlurper class in a ExecuteScript processor (Groovy 3.0.17) nor in the ExecuteGroovyScript processor (Groovy 3.0.18). With a minimal script body like&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-string"&gt;import&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;groovy.yaml.YamlSlurper&lt;/SPAN&gt;
&lt;SPAN class="hljs-string"&gt;return&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;I get the following after clicking Verify Properties:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-string"&gt;Perform&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;Validation&lt;/SPAN&gt;
&lt;SPAN class="hljs-attr"&gt;Component is invalid:&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;'GroovyScript'&lt;/SPAN&gt; &lt;SPAN class="hljs-attr"&gt;is invalid because org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script53405bee.groovy: 1:&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;unable&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;to&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;resolve&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;class&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;groovy.yaml.YamlSlurper&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;@&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;line&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;,&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;column&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;392&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;.&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;che.nifi.logging.ComponentLog;import&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;gro&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;^&lt;/SPAN&gt; &lt;SPAN class="hljs-attr"&gt;org.codehaus.groovy.syntax.SyntaxException:&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;unable&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;to&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;resolve&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;class&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;groovy.yaml.YamlSlurper&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;@&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;line&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;,&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;column&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;392&lt;/SPAN&gt;&lt;SPAN class="hljs-string"&gt;.&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.ast.ClassCodeVisitorSupport.addError(ClassCodeVisitorSupport.java:262)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1424)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:262)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.control.CompilationUnit.lambda$new$16(CompilationUnit.java:739)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:902)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:628)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;groovy.lang.GroovyShell.parseClass(GroovyShell.java:526)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;groovy.lang.GroovyShell.parse(GroovyShell.java:538)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;groovy.lang.GroovyShell.parse(GroovyShell.java:570)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.processors.groovyx.ExecuteGroovyScript.getGroovyScript(ExecuteGroovyScript.java:338)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.processors.groovyx.ExecuteGroovyScript.customValidate(ExecuteGroovyScript.java:222)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.components.AbstractConfigurableComponent.validate(AbstractConfigurableComponent.java:130)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.controller.AbstractComponentNode.computeValidationErrors(AbstractComponentNode.java:780)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.controller.StandardProcessorNode.computeValidationErrors(StandardProcessorNode.java:1141)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.controller.AbstractComponentNode.performValidation(AbstractComponentNode.java:735)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.controller.AbstractComponentNode.verifyConfig(AbstractComponentNode.java:392)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.controller.StandardProcessorNode.verifyConfiguration(StandardProcessorNode.java:1071)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.dao.impl.StandardProcessorDAO.verifyProcessorConfiguration(StandardProcessorDAO.java:488)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.dao.impl.StandardProcessorDAO$$FastClassBySpringCGLIB$$779e089b.invoke(&amp;lt;generated&amp;gt;)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.dao.impl.StandardProcessorDAO$$EnhancerBySpringCGLIB$$4feca1d.verifyProcessorConfiguration(&amp;lt;generated&amp;gt;)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.StandardNiFiServiceFacade.performProcessorConfigVerification(StandardNiFiServiceFacade.java:843)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke(&amp;lt;generated&amp;gt;)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$245ce634.performProcessorConfigVerification(&amp;lt;generated&amp;gt;)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.api.ProcessorResource.lambda$performAsyncConfigVerification$27(ProcessorResource.java:1097)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;org.apache.nifi.web.api.concurrent.AsyncRequestManager$2.run(AsyncRequestManager.java:117)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;Source)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;java.base/java.util.concurrent.FutureTask.run(Unknown&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;Source)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;Source)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;Source)&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;at&lt;/SPAN&gt;
 &lt;SPAN class="hljs-string"&gt;java.base/java.lang.Thread.run(Unknown&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;Source)&lt;/SPAN&gt; &lt;SPAN class="hljs-number"&gt;1&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;error&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;I also tried&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="hljs-string"&gt;def&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;YamlSlurper&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;groovy.yaml.YamlSlurper&lt;/SPAN&gt;
&lt;SPAN class="hljs-string"&gt;def&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;y&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;new&lt;/SPAN&gt; &lt;SPAN class="hljs-string"&gt;YamlSlurper()&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;Same result.&lt;/P&gt;&lt;P&gt;Bug? Or am I missing something? Is there a workaround?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 03:54:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379363#M243844</guid>
      <dc:creator>GBC</dc:creator>
      <dc:date>2023-11-22T03:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: unable to resolve class groovy.yaml.YamlSlurper in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379366#M243846</link>
      <description>&lt;P&gt;It could be NiFi only includes the core Groovy jar files and you may need to download the additional ones and add to the NiFi lib directory for the additional classes to be accessible.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 06:56:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379366#M243846</guid>
      <dc:creator>joseomjr</dc:creator>
      <dc:date>2023-11-22T06:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: unable to resolve class groovy.yaml.YamlSlurper in Nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379430#M243862</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Yes, turns out th&lt;/SPAN&gt;e&amp;nbsp;groovy-yaml&amp;nbsp;mo&lt;SPAN&gt;dule is an&amp;nbsp;&lt;EM&gt;optional&lt;/EM&gt;&amp;nbsp;module in Groovy 3, however groovy-yaml-3.0.17.jar is actually included in nifi-scripting-nar-1.23.2 but the ExecuteScript processor when started throws the exception I mentioned. Possibly this indicates there are other dependencies that would need to be explicitly included in the classpath (e.g. jackson-databind, jackson-dataformat-yaml, groovy-json)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was hoping to use YamlSlurper followed by JsonBuilder to do YAML to JSON conversions. In the end I used the Jackson YamlFactory and ObjectMapper to achieve the desired result.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 22:46:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/unable-to-resolve-class-groovy-yaml-YamlSlurper-in-Nifi/m-p/379430#M243862</guid>
      <dc:creator>GBC</dc:creator>
      <dc:date>2023-11-22T22:46:21Z</dc:date>
    </item>
  </channel>
</rss>

