[ https://issues.apache.org/jira/browse/NIFI-632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14579885#comment-14579885 ]
Dan Bress commented on NIFI-632: -------------------------------- [~mcgilman] and [~markap14], I think I finally have this one wrapped up. Four key points I'd like you guys to sign off on * Moved NarCloseable and NarThreadContextClassLoader into nifi-nar-utils, since this is in the lib directory and documentation needs it. Fixed [Here|https://github.com/apache/incubator-nifi/commit/f4d5070dfbfaaf8278e0e27cbe7957ba89cd8958] * The [ServiceLoader|http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html] instantiates objects when you [iterate over it|http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html#iterator()] as [ExtensionManger is doing|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/ExtensionManager.java#L109-L111]. This causes FileSystemRepository to kick off [multiple threads|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java#L196] in its [constructor|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java#L198], which gets called multiple times. Fixed [here|https://github.com/apache/incubator-nifi/commit/db1302ecbe6ccdb688d129a57ef734d64d6a2ed2] * [ReflectionUtils|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-mock/src/main/java/org/apache/nifi/util/ReflectionUtils.java] is something I'd like to use in documentation to call methods with annotations. Unfortunately I shouldn't use it, because nifi-runtime depends on nifi-documentation, and we don't want anything that nifi-runtime depends on bringing in a bunch of dependencies. Short term [I copied ReflectionUtils into nifi-documentation|https://github.com/apache/incubator-nifi/commit/0608e6ee24e8fc99b4e3d3a40d01e9f3c029ccc1#diff-056b07ed1ad54b62d1dd2b4170509744]. Long term I'd like to move where [DocGenerator|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java] gets [invoked from NiFi|https://github.com/apache/incubator-nifi/blob/develop/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-runtime/src/main/java/org/apache/nifi/NiFi.java#L123] to something else. * For some reason, when I started using the NarClosable, None of the services in framework nar were being registered by ExtensionManager. So [I created service files for these|https://github.com/apache/incubator-nifi/commit/56e40dd7da8254667c28cbbed5f4885f66aa65ca]. > Documentation Generation: Nar ClassLoader > ----------------------------------------- > > Key: NIFI-632 > URL: https://issues.apache.org/jira/browse/NIFI-632 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Affects Versions: 0.1.0 > Reporter: Matt Gilman > Assignee: Dan Bress > Priority: Minor > Fix For: 0.2.0 > > > When auto generating component documentation the NarThreadContextClassLoader > needs to be set in case the component attempts to load anything off of its > classpath. Without this, the documentation generation fails. -- This message was sent by Atlassian JIRA (v6.3.4#6332)