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

NPE if database history filename has no parent folder

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: