Github user YolandaMDavis commented on the issue:

    https://github.com/apache/nifi/pull/752
  
    @markap14 found an issue during testing.  When attempting to run the 
SiteToSiteProvenanceReporterTask on a single node setup (attempting to report 
to a cluster) I did not have the site to site port set, so the task attempted 
to log a warning. In the process it received an IllegalAccessException when it 
was attempting to use the getLogger parent method to obtain a logger to log the 
warning.  That causes setup to fail and the reporter to not execute (see 
attached log).   I think changing the code in 
AbstractSiteToSiteReportingTask.java (starting at line 115) to use a locally 
declared logger variable defaulted using the getLogger() method will help (e.g. 
declaring  final ComponentLog logger = getLogger(); and using logger in the 
EventReporter). Here is the current code with suggested changes in comments:
    
    `
    //suggest to add 
    //ComponentLog logger = getLogger();
     final EventReporter eventReporter = new EventReporter() {
                @Override
                public void reportEvent(final Severity severity, final String 
category, final String message) {
                    switch (severity) {
                        case WARNING:
                            getLogger().warn(message); //suggest change to 
logger.warn(message);
                            break;
                        case ERROR:
                            getLogger().error(message); //suggest change to 
logger.error(message);
                            break;
                        default:
                            break;
                    }
                }
            };
    `
    
    When the SiteToSite port value was set on the cluster, communication 
occurred as expected and the contextURI in the captured json appears in the 
format expected. (e.g. http://localhost:808/nifi-api )
    
    Attached are pictures of the error:
    <img width="1440" alt="sitetositeloggererror" 
src="https://cloud.githubusercontent.com/assets/1371858/17322062/aaad713c-5869-11e6-8e1b-cd33e5b30b54.png";>
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to