Uploaded image for project: 'Apache NiFi MiNiFi - MOVED TO NIFI PROJECT'
  1. Apache NiFi MiNiFi - MOVED TO NIFI PROJECT
  2. MINIFI-128

NPE if nifi.minifi.notifier.file.config.path wasn't configured

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.0.1
    • 0.2.0
    • None
    • current master branch build

    Description

      When enabling a FileChangeNotifier, it's easy to forget uncommenting the nifi.minifi.notifier.file.config.path property (required). Minifi restart will throw an unfriendly error:

      Exception in thread "main" java.lang.IllegalArgumentException: Property, nifi.minifi.notifier.file.config.path, for the path of the config file must be specified.
              at org.apache.nifi.minifi.bootstrap.configuration.notifiers.FileChangeNotifier.initialize(FileChangeNotifier.java:154)
              at org.apache.nifi.minifi.bootstrap.RunMiNiFi.initializeNotifiers(RunMiNiFi.java:1452)
              at org.apache.nifi.minifi.bootstrap.RunMiNiFi.start(RunMiNiFi.java:1116)
              at org.apache.nifi.minifi.bootstrap.RunMiNiFi.main(RunMiNiFi.java:224)
      Initiating shutdown of bootstrap change notifiers...
      Exception in thread "Thread-2" java.lang.NullPointerException
              at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1026)
              at java.util.Collections$UnmodifiableSet.<init>(Collections.java:1128)
              at java.util.Collections.unmodifiableSet(Collections.java:1118)
              at org.apache.nifi.minifi.bootstrap.RunMiNiFi.getChangeNotifiers(RunMiNiFi.java:1438)
              at org.apache.nifi.minifi.bootstrap.ShutdownHook.run(ShutdownHook.java:57)
      

      Expected: improve the error message to be meaningful and suggest the user configure the property. No stacktrace, as we know what's going on exactly.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aldrin Aldrin Piri
            aperepel Andrew Grande
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment