[
https://issues.apache.org/jira/browse/NIFI-5234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard resolved NIFI-5234.
----------------------------------
Resolution: Feedback Received
Apache NiFi 1.x is no longer maintained and no new release is planned on the
1.x release line. Marking as resolved as part of a cleanup operation. Please
open a new one with an updated description if this is still relevant for NiFi
2.x.
> Nifi Expression testing groovy tool Error grabbing Grapes
> -----------------------------------------------------------
>
> Key: NIFI-5234
> URL: https://issues.apache.org/jira/browse/NIFI-5234
> Project: Apache NiFi
> Issue Type: Bug
> Components: Tools and Build
> Affects Versions: 1.6.0
> Environment: Mac OSX
> Reporter: dan young
> Priority: Minor
>
> I'm trying to run the Nifi Expression testing groovy tool with 1.6.0 and am
> getting the following dep error....Nifi 1.4 and 1.5 works fine. I tried to
> also download via grape in the groovy cli the jackson-core and it doesn't
> work for the 2.9.4 version 2.9.5 works fine but the deps seem to rely on
> 2.9.4
>
> I can use the 1.5 w/o issue....
>
>
>
> λ ~/software/nifi-tools groovy testEL-1.6.groovy '${now():format("yyyyMMdd")}'
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> General error during conversion: Error grabbing Grapes -- [download failed:
> com.fasterxml.jackson.core#jackson-core;2.9.4!jackson-core.jar(bundle)]
>
> java.lang.RuntimeException: Error grabbing Grapes -- [download failed:
> com.fasterxml.jackson.core#jackson-core;2.9.4!jackson-core.jar(bundle)]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at
> org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
> at
> org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
> at
> org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
> at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:424)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:169)
> at
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
> at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:571)
> at groovy.grape.GrapeIvy$resolve$1.callCurrent(Unknown Source)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:193)
> at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:538)
> at groovy.grape.GrapeIvy$resolve$0.callCurrent(Unknown Source)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
> at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:256)
> at groovy.grape.Grape.grab(Grape.java:167)
> at
> groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)
> at
> org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:346)
> at
> org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:966)
> at
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626)
> at
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
> at
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
> at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
> at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
> at groovy.lang.GroovyShell.parseClass(GroovyShell.java:677)
> at groovy.lang.GroovyShell.run(GroovyShell.java:506)
> at groovy.lang.GroovyShell.run(GroovyShell.java:496)
> at groovy.ui.GroovyMain.processOnce(GroovyMain.java:597)
> at groovy.ui.GroovyMain.run(GroovyMain.java:329)
> at groovy.ui.GroovyMain.process(GroovyMain.java:315)
> at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)
> at groovy.ui.GroovyMain.main(GroovyMain.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:116)
> at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:138)
>
> 1 error
> Here's the script I'm using pulled from Matt B. examples...
> @Grab(group='org.apache.nifi', module='nifi-expression-language',
> version='1.6.0')
> import org.apache.nifi.attribute.expression.language.*
> def cli = new CliBuilder(usage:'groovy testEL.groovy [options] [expressions]',
> header:'Options:')
> cli.help('print this message')
> cli.D(args:2, valueSeparator:'=', argName:'attribute=value',
> 'set value for given attribute')
> def options = cli.parse(args)
> if(!options.arguments()) {
> cli.usage()
> return 1
> }
> def attrMap = [:]
> def currKey = null
> options.Ds?.eachWithIndex {o,i ->
> if(i%2==0) {
> currKey = o
> } else {
> attrMap[currKey] = o
> }
> }
> options.arguments()?.each {
> def q = Query.compile(it)
> println q.evaluate(attrMap ?: null)
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)