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

Dan Bress commented on NIFI-632:
--------------------------------

[~mcgilman] Patch attached, I believe I was accurately recreating your scenario 
with the test processor.  Please let me know if this fix doesn't solve your 
problem.
See: 
[Here|https://github.com/apache/incubator-nifi/blob/NIFI-632/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java#L54-L67]

[~mcgilman] and [~markap14] and anyone else,
I'm setting/Unsetting a NarThreadContextLoader within the DocGenerator.  Does 
this seem reasonable to you?  Is there a better way?
See: 
[Here|https://github.com/apache/incubator-nifi/blob/NIFI-632/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java#L73-L91]

Also, I create an "example.nar", and the compiled artifact lives in 
[nifi-documentation/src/test/test/resources/example.nar|https://github.com/apache/incubator-nifi/blob/NIFI-632/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar].
  It's source lives in 
[nifi-externals|https://github.com/apache/incubator-nifi/tree/NIFI-632/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors].
  I didn't think it was a good idea to have the nifi-documentation artifact 
depend directly on the nifi-external artifact.  Was worried about getting into 
a circular dependency issue.  I never actually tried it, so I don't know if it 
would actually be a problem.  Thoughts?

> 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.1.1
>
>         Attachments: 0001-my-squashed-commits-for-NIFI-632.patch
>
>
> 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)

Reply via email to