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

NPE if database history filename has no parent folder

    Details

    • Steps to Reproduce:
      • 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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tomaz.fernandes Tomaz Fernandes
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: