Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1122

NPE if database history filename has no parent folder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.9.1.Final
    • 0.9.0.Final
    • core-library
    • None
      • Set the database history to FileDatabaseHistory.class.getName()
      • Set database.history.file.filename=dbhistory.dat
      • Start the debezium embedded engine

      In class FileDatabaseHistory line 77 I get a NullPointerException if I have no parent folder on the "database.history.file.filename" property.

      What causes the NPE is that "path.getParent()" returns null, which is then passed as a parameter to "Files.createDirectory(null)", and it in turn throws the exception.

      I got it working by passing "/history/dbhistory.dat" as dbhistory filename. The same behaviour does not occur for the offset storage filename property.

      If that's ok I´ll take a look at this and submit a PR fixing it.

              Unassigned Unassigned
              tomaz.fernandes Tomaz Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: