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 <gippyp...@gmail.com> wrote: > > 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") > .displayName("JSON ID Path") > .description("The path to the JSON attribute that represents the > unique ID for the object") > .addValidator(StandardValidators.NON_BLANK_VALIDATOR) > .required(true) > .build(); > > > 2017-11-07 04:13:46,855 ERROR [main] org.apache.nifi.NiFi Failure to launch > NiFi due to java.util.ServiceConfigurationError: > org.apache.nifi.processor.Processor: Provider > com.jidmu.processors.JSONCondenser.JSONCondenser could not be instantiated > java.util.ServiceConfigurationError: org.apache.nifi.processor.Processor: > Provider com.jidmu.processors.JSONCondenser.JSONCondenser could not be > instantiated > at java.util.ServiceLoader.fail(ServiceLoader.java:232) > at java.util.ServiceLoader.access$100(ServiceLoader.java:185) > at > java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) > at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) > at java.util.ServiceLoader$1.next(ServiceLoader.java:480) > at > org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:138) > at > org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:104) > at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:699) > at org.apache.nifi.NiFi.<init>(NiFi.java:160) > at org.apache.nifi.NiFi.main(NiFi.java:267) > Caused by: java.lang.NoClassDefFoundError: > org/apache/nifi/processor/util/StandardValidators > at > com.jidmu.processors.JSONCondenser.JSONCondenser.<clinit>(JSONCondenser.java:58) > 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 java.lang.Class.newInstance(Class.java:442) > at > java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) > ... 7 common frames omitted > Caused by: java.lang.ClassNotFoundException: > org.apache.nifi.processor.util.StandardValidators > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > ... 14 common frames omitted > > >> On 7 Nov 2017, at 4:02 am, Joe Witt <joe.w...@gmail.com> wrote: >> >> 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 <gippyp...@gmail.com> wrote: >>> 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 changed >>> versions of any software. >>> >>> I removed any reference to StandardValidators, and the NAR then loaded >>> successfully. As I added some more functionality, I then had the same >>> ClassNotFoundException occur with a different random class. >>> >>> Because I have used the maven archetype, all my other processors obviously >>> use StandardValidators, so it's not like the class itself is somehow >>> corrupted. This feels like either a NiFi or maybe even JVM bug (or other >>> issue that is surfacing as this ClassNotFoundException). >>> >>> Pulling my hair out here - would love some help! >>> >>> Cheers, >>> Phil >