[ https://issues.apache.org/jira/browse/NIFI-2034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15575480#comment-15575480 ]
Matt Burgess commented on NIFI-2034: ------------------------------------ What about the NAR POM? Does that specify another NAR as a parent? NiFi uses parent-first classloaders, so if those JARs are loaded anywhere in the parent chain, then you will not be able to override your NAR to use your local ones without some of your own local classloader voodoo. > NiFi is always loading a specific version of httpcore to classpath > ------------------------------------------------------------------ > > Key: NIFI-2034 > URL: https://issues.apache.org/jira/browse/NIFI-2034 > Project: Apache NiFi > Issue Type: Bug > Affects Versions: 0.5.1, 0.6.1 > Reporter: asanka sanjaya > > We have written a custom nifi processor to connect to microsoft exchange > server and get emails. It runs perfectly as a standalone application. But > nifi always loads httpcore-4.4.1.jar and httpclient-4.4.1.jar to classpath > even though the nar file contains httpcore-4.4.4.jar and httpclient-4.5.2.jar. > Because of that, it throws this error. > 016-06-15 18:57:17,086 WARN [Timer-Driven Process Thread-4] > o.a.n.c.t.ContinuallyRunProcessorTask Administratively Yielding > NiFiJournalJob[id=52616329-d64c-4e14-bcb1-4c799891682a] due to uncaught > Exception: java.lang.NoSuchFieldError: INSTANCE > 2016-06-15 18:57:17,091 WARN [Timer-Driven Process Thread-4] > o.a.n.c.t.ContinuallyRunProcessorTask > java.lang.NoSuchFieldError: INSTANCE > at > org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52) > ~[httpcore-4.4.1.jar:4.4.1] > at > org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56) > ~[httpcore-4.4.1.jar:4.4.1] > at > org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46) > ~[httpcore-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:82) > ~[httpclient-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:95) > ~[httpclient-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:104) > ~[httpclient-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:62) > ~[httpclient-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:142) > ~[httpclient-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:128) > ~[httpclient-4.4.1.jar:4.4.1] > at > org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:157) > ~[httpclient-4.4.1.jar:4.4.1] > at > microsoft.exchange.webservices.data.core.ExchangeServiceBase.initializeHttpClient(ExchangeServiceBase.java:199) > ~[na:na] > at > microsoft.exchange.webservices.data.core.ExchangeServiceBase.<init>(ExchangeServiceBase.java:174) > ~[na:na] > at > microsoft.exchange.webservices.data.core.ExchangeServiceBase.<init>(ExchangeServiceBase.java:179) > ~[na:na] > at > microsoft.exchange.webservices.data.core.ExchangeService.<init>(ExchangeService.java:3729) > ~[na:na] > -- This message was sent by Atlassian JIRA (v6.3.4#6332)