Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Classloading question for processor using service

Classloading question for processor using service

New Contributor


I try to create custom processor and service.

For instance, the service is used to build a session on a commercial product.

Then in processors, I call the service to get the sesssion and do the stuff.

In order to connect to commercial product, I need to include additionnal JAR. So in the service, I put a property that dynamically update the classpath, where I put location for the folder that contains jar.

But, in the processor, I also need to have jar availabled in rder to avoid the no class def found exception. But this does not work for me. If I well understand, this is because there is a classloader per NAR. So if the service is in specific NAR, the classloader modification will not be applyed to the classloader used for the processor.

Then, I moved the service inside the same NAR than the processor.

But, I still not able to avoid the no class def found. The modification made by the service during the "OnEnable" is not applied when the processor is executed ?

I do not want to include external jar in my NAR, because it could be generic, meaning as if I load specific version of JDBC.

Not sure to be clear.


Etienne Jouvin


Re: Classloading question for processor using service

New Contributor

Forget the question.

All perfectly works.

My problem seems to be other. The loaded classes from the thrid party classes failed to be loaded when inside a class. But when I try to load it individually, like SQL driver, it works.

Anway, my question is not valid

Don't have an account?
Coming from Hortonworks? Activate your account here