Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4045

NPE when running oak-run from within the IDE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.4, 1.4.0
    • run

    Description

      Running oak-run from within the IDE causes a NPE:

      Exception in thread "main" java.lang.NullPointerException
      	at java.util.Properties$LineReader.readLine(Properties.java:434)
      	at java.util.Properties.load0(Properties.java:353)
      	at java.util.Properties.load(Properties.java:341)
      	at org.apache.jackrabbit.oak.run.Main.getProductVersion(Main.java:76)
      	at org.apache.jackrabbit.oak.run.Main.getProductVersion(Main.java:66)
      	at org.apache.jackrabbit.oak.run.Main.getProductInfo(Main.java:53)
      	at org.apache.jackrabbit.oak.run.Main.printProductInfo(Main.java:86)
      

      This is caused by not checking the return value of getResourceAsStream for null when trying to load /META-INF/maven/org.apache.jackrabbit/oak-run/pom.properties. That file is not on the class path when running from within the IDE.

      Attachments

        Activity

          People

            mduerig Michael Dürig
            mduerig Michael Dürig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: