Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2191

Karaf 3.0.x CLONE - Karaf startup fails with NullPointerException when logfile can't be written

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

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.9, 2.3.0, 3.0.0
    • 2.2.12, 2.4.0, 3.0.0
    • karaf
    • None

    Description

      The karaf startup fails with a NullPointerException when the logifle can't be accessed:

      java.io.FileNotFoundException: /opt/karaf/data/log/karaf.log (Permission denied)
      at java.io.FileOutputStream.openAppend(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
      at org.apache.karaf.main.BootstrapLogManager$SimpleFileHandler.open(BootstrapLogManager.java:115)
      at org.apache.karaf.main.BootstrapLogManager$SimpleFileHandler.<init>(BootstrapLogManager.java:104)
      at org.apache.karaf.main.BootstrapLogManager.getDefaultHandler(BootstrapLogManager.java:83)
      at org.apache.karaf.main.Main.launch(Main.java:234)
      at org.apache.karaf.main.Main.main(Main.java:429)
      Could not create framework: java.lang.NullPointerException
      java.lang.NullPointerException
      at java.util.logging.Logger.addHandler(Logger.java:1185)
      at org.apache.karaf.main.Main.launch(Main.java:234)
      at org.apache.karaf.main.Main.main(Main.java:429)

      This should be changed to: Output a meaningfull message e.g. "Karaf can't startup, make sure the logifle can be accessed and written by the user starting Karaf",
      OR
      try to allocate a logfile with a different name.

      Attachments

        Issue Links

        Activity

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

          People

            pieber Andreas Pieber
            jgoodyear Jamie Mark Goodyear
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment