nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aldrin Piri <aldrinp...@gmail.com>
Subject Re: custom processor development : problems with scops in parent POM
Date Wed, 06 Apr 2016 19:12:20 GMT
Hello!

Are you trying to incorporate this into the repository check out or a
standalone bundle?

In the case of the latter, could you confirm you have established a project
dependency structure such as that outlined in the Wiki [1]?

Not only is a provided scope needed to be able to build/compile, but there
must also be a dependency on the associated NAR.

Please let us know if you are still experiencing issues.

[1]
https://cwiki.apache.org/confluence/display/NIFI/Maven+Projects+for+Extensions#MavenProjectsforExtensions-LinkingProcessorsandControllerServices

On Fri, Mar 25, 2016 at 5:01 PM, N H <nhtest@yahoo.com> wrote:

> Hi,
> 1. using  org.apache.nifi.distributed.cache.client.Deserializer interface
> in a custom processor.
> 2. this dependency in pom is needed :
> nifi-distributed-cache-client-service-api (its scopy is "provided" in
> parent pom)
> 3. after deploying processor, this exception is thrown :
>
> 2016-03-26 01:11:02,776 ERROR [main] org.apache.nifi.NiFi Failure to
> launch NiFi due to java.util.ServiceConfigurationError:
> org.apache.nifi.processor.Processor: Provider my.nifi.processor.MyProcessor
> could not be instantiated
> java.util.ServiceConfigurationError: org.apache.nifi.processor.Processor:
> Provider my.nifi.processor.MyProcessor could not be instantiated
>     at java.util.ServiceLoader.fail(ServiceLoader.java:224) ~[na:1.7.0_67]
>     at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
> ~[na:1.7.0_67]
>     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
> ~[na:1.7.0_67]
>     at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
> ~[na:1.7.0_67]
>     at
> org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:107)
> ~[nifi-nar-utils-0.5.1.jar:0.5.1]
>     at
> org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:88)
> ~[nifi-nar-utils-0.5.1.jar:0.5.1]
>     at org.apache.nifi.NiFi.<init>(NiFi.java:120)
> ~[nifi-runtime-0.5.1.jar:0.5.1]
>     at org.apache.nifi.NiFi.main(NiFi.java:227)
> ~[nifi-runtime-0.5.1.jar:0.5.1]
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/nifi/distributed/cache/client/Deserializer
>     at java.lang.Class.getDeclaredConstructors0(Native Method)
> ~[na:1.7.0_67]
>     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)
> ~[na:1.7.0_67]
>     at java.lang.Class.getConstructor0(Class.java:2842) ~[na:1.7.0_67]
>     at java.lang.Class.newInstance(Class.java:345) ~[na:1.7.0_67]
>     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
> ~[na:1.7.0_67]
>     ... 5 common frames omitted
> Caused by: java.lang.ClassNotFoundException:
> org.apache.nifi.distributed.cache.client.Deserializer
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> ~[na:1.7.0_67]
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> ~[na:1.7.0_67]
>     at java.security.AccessController.doPrivileged(Native Method)
> ~[na:1.7.0_67]
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> ~[na:1.7.0_67]
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_67]
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_67]
>     ... 10 common frames omitted
>
> simply because nifi-distributed-cache-client-service-api-0.5.1.jar is not
> packaged in nar (due to scope of dependency in parent pom).
>
>
>
>
>

Mime
View raw message