nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas Willcocks <>
Subject Custom NAR Class Loader Issue
Date Fri, 02 Mar 2018 18:27:56 GMT
Hi all,

I'm encountering a JAR version dependency issue when developing a custom
Processor that uses the GCPCredentialsService in Nifi 1.5.0.

1) The nifi-gcp-bundle distributed with Nifi 1.5.0 (which contains
GCPCredentialsService) is packaged with dependencies on:


Which both transitively depend on, except the
root-level pom.xml for Nifi (here
<>) explicitly pins the
guava version to 18.0.

2) The custom Processor I am building also depends on, but actually uses methods from this
library that depend on features added in

3) In order to make the GCPCredentialsService available inside my Processor
NAR, I have added the nifi-gcp-services-api-nar as a parent.

4) The implementation of NarClassLoader always starts the search for
classes in the parent, which means that when my processor looks for class definitions, the JAR
packaged with the nifi-gcp-services-api-nar is always found first,
resulting in a java.lang.NoSuchMethodError exception in my Processor's

I'm not sure what the best solution is – I guess I could create my own
version of the nifi-gcp-bundle that has the correct pom.xml file to force
the use of guava:19.0, but that seems a bit overkill for a change that is
essentially 5 lines of XML in a POM file.

Any suggestions or thoughts?


Douglas Willcocks
VP France, Data Science & Engineering

19 Rue Richer, 75009 Paris, France
M: +33 6 80 37 60 72


This email and any attachments contains privileged and confidential 
information intended only for the use of the addressee(s). If you are not 
an intended recipient of this email, you are hereby notified that any 
dissemination, copying or use of information is strictly prohibited. If you 
received this email in error or without authorization, please delete the 
email from your system and notify us immediately by sending us an email. If 
you need any further assistance, please send a message to

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message