[ 
https://issues.apache.org/jira/browse/NIFI-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15625702#comment-15625702
 ] 

Joseph Witt commented on NIFI-2971:
-----------------------------------

Ok so have conducted a good bit more analysis and here is the plan.

1) Will create a WIKI page which outlines how the classloader 
hierarchy/classloading works in more detail.  It should include a diagram of 
what the classloader hierarchy looks like and explain the parent-first 
classloading model and why certain elements are where they are in the tree.  
This should help people building extensions but also help others who wish to 
provide alternative models.

2) The application classloader (jars in the lib folder) will include the 
following items:
* Standard Logging APIs/Impls
** ./jcl-over-slf4j-1.7.12.jar
** ./jul-to-slf4j-1.7.12.jar
** ./log4j-over-slf4j-1.7.12.jar
** ./logback-classic-1.1.3.jar
** ./logback-core-1.1.3.jar
** ./slf4j-api-1.7.12.jar
* NiFi API Definitions
** ./nifi-api-1.1.0-SNAPSHOT.jar
*** This is where first-class definitions of Interfaces for primary extension 
points like processors, reporting tasks, and controller services live.  These 
are for use in Apache NiFi and Apache MiNiFi.
** ./nifi-framework-api-1.1.0-SNAPSHOT.jar
*** This holds definitions of secondary extension points like authorization 
providers and others not current part of the nifi-api but which custom nars may 
implement.  These are only intended for use by Apache NiFi.
** ./nifi-properties-1.1.0-SNAPSHOT.jar
*** This holds the definition of what nifi-properties can hold and provides 
convenience methods to access certain properties.
* NiFi Startup Libraries
** ./nifi-runtime-1.1.0-SNAPSHOT.jar
*** This will create a 'bootstrap classloader' which is used to do properties 
loading/make initial properties object which then kicks off normal startup.  
The bootstrap classloader will use the actual lib/bootstrap contents to have a 
classloader for the purpose of constructing a nifi-properties instance which 
will be used to do the rest of the normal startup procedure.
** ./nifi-documentation-1.1.0-SNAPSHOT.jar
*** At present this has no dependencies so is ok to have it here.  With the 
extension registry work this should go away completely and docs may be 
generated during build time rather than at startup.  So for now it is ok as.
** ./nifi-nar-utils-1.1.0-SNAPSHOT.jar
*** This is used by runtime to create the expanded nar directories.


So the net of all this is we'll go back to a clean/intended application 
classloader.  In another JIRA/effort we can look at ways to reduce the copies 
of bcprov that have made their way throughout the codebase.


> bcprov and commons-lang usage in application classloader
> --------------------------------------------------------
>
>                 Key: NIFI-2971
>                 URL: https://issues.apache.org/jira/browse/NIFI-2971
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework, Tools and Build
>    Affects Versions: 1.0.0
>            Reporter: Joseph Witt
>            Assignee: Joseph Witt
>            Priority: Blocker
>             Fix For: 1.1.0
>
>
> In reviewing NIFI-2954 it was noticed that the work in NIFI-1831 led to 
> bcprov and commons-lang3 entering the root application classloader which 
> pollutes all classloaders.  The only things that should be in the root 
> classloader are logging libraries, the nifi api, and a way to bootstrap the 
> application.
> These dependencies need to get moved into the nar and executed via the nifi 
> startup routine



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to