Re: Classloader issues

2017-11-06 Thread Phil H
While we're talking about this, is there a simple way to have maven put the NAR file into my NiFi lib directory automatically as part of the "mvn install" script? Cheers, Phil > On 7 Nov 2017, at 05:22, Joe Witt wrote: > > Phil - you are the first person to ever make that mistake. > > Nope,

Re: Classloader issues

2017-11-06 Thread Phil H
Yep, replacing the JAR with the NAR (and then re-connecting it through the UI) worked. As a nice postscript to the story, the previously untested filtering algorithm i had written worked as expected first time too :-) Thanks so much for your help, team! > On 7 Nov 2017, at 5:22 am, Joe Witt w

Re: Classloader issues

2017-11-06 Thread Joe Witt
Phil - you are the first person to ever make that mistake. Nope, not true :) No worries and thanks for following up. I believe once we have the extension registry in play this sort of thing will be much easier/simpler. Thanks On Mon, Nov 6, 2017 at 1:20 PM, Phil H wrote: > Hey, now I see the

Re: Classloader issues

2017-11-06 Thread Bryan Bende
Correct :) Technically we do support deploying extensions in JARs, but if you did that you would only be able to utilize JARs that are directly in lib, and since nifi-utils is not one of those, it explains why your processor coming from the JAR cannot find StandardValidators. Long story short, I

Re: Classloader issues

2017-11-06 Thread Phil H
Hey, now I see the problem - I had (somehow?!?) managed to copy the JAR file rather than the NAR file > On 7 Nov 2017, at 5:17 am, Phil H wrote: > > Thanks Bryan, > > This new NAR does not appear in the extensions directory (my other working > ones do). > > As for your second question > >

Re: Classloader issues

2017-11-06 Thread Phil H
Thanks Bryan, This new NAR does not appear in the extensions directory (my other working ones do). As for your second question [phil@localhost JSONCondenser]$ ls ~/nifi-1.3.0/lib/ | grep jar javax.servlet-api-3.1.0.jar jcl-over-slf4j-1.7.25.jar jetty-schemas-3.1.jar jul-to-slf4j-1.7.25.jar log

Re: Classloader issues

2017-11-06 Thread Bryan Bende
Thanks for the poms. Can you provide the output of listing NIFI_HOME/work/nar/extensions/.nar-unpacked/META-INF/bundled-dependencies/ ? and also the output of listing JARs that are in NiFi's lib directory? ls -l NIFI_HOME/lib/ | grep jar Want to verify that nifi-utils JAR is actually in your NAR

Re: Classloader issues

2017-11-06 Thread Phil H
./pom.xml (Note that this issue occurred BEFORE I added the external JAR dependency, and I have that exact same org.json dependency in a bunch of other processors I have written without issue) http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schema

Re: Classloader issues

2017-11-06 Thread Bryan Bende
It is most likely an issue with the Maven configuration in one of your modules. Can you share your project, or the pom files for the processors, NAR, and bundle? Thanks, Bryan On Mon, Nov 6, 2017 at 12:20 PM, Phil H wrote: > Nifi version is 1.3.0, running on Java 1.8.0_131, running on a out-o

Re: Classloader issues

2017-11-06 Thread Phil H
Nifi version is 1.3.0, running on Java 1.8.0_131, running on a out-of-the-box CentOS (if that’s relevant) > On 7 Nov 2017, at 4:17 am, Phil H wrote: > > I added the StandardValidators reference back in and the original error > reoccurs. The offending code (which compiles fine using the same J

Re: Classloader issues

2017-11-06 Thread Phil H
I added the StandardValidators reference back in and the original error reoccurs. The offending code (which compiles fine using the same JDK) is totally standard stuff: public static final PropertyDescriptor ID_PATH = new PropertyDescriptor .Builder().name("ID_PATH")

Re: Classloader issues

2017-11-06 Thread Matt Burgess
Phil, Any chance you could share your NAR and processor POMs? Your processor POM should have a dependency on nifi-utils. What are the other classes that aren't found? I'm curious if they are in the same JAR/NAR or not. Do you have a parent NAR set (in your bundle's NAR POM)? Also once your NAR is

Re: Classloader issues

2017-11-06 Thread Joe Witt
Can you share the code by chance for a review? Otherwise, you'll want to add a debugger at runtime and examine the context classloader as it goes through to see where it goes wonky. What version are you on? Thanks On Mon, Nov 6, 2017 at 11:58 AM, Phil H wrote: > Hi guys, > > I have just (today

Classloader issues

2017-11-06 Thread Phil H
Hi guys, I have just (today) started having issues with a new processor I've written where a seemingly random class (e.g.: StandardValidators) fails to load when NiFi is initializing. I've created this processor like all my others (using the maven archetype) and the VM I'm running it on has not