Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5234

Nifi Expression testing groovy tool Error grabbing Grapes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.6.0
    • None
    • Tools and Build
    • None
    • Mac OSX

    Description

      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) }

      Attachments

        Activity

          People

            Unassigned Unassigned
            danoyoung dan young
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: