Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : NullPointerException when running generateChangeLog using MySQL and Liquibase 3.2.2

$
0
0
Looking at the source code mentioned in the stack trace, I see this at liquibase.diff.output.changelog.core.MissingForeignKeyChangeGenerator.fixMissing(MissingForeignKeyChangeGenerator.java:43)

       change.setReferencedTableName(fk.getPrimaryKeyTable().getName());

The 'change' object is created in that method, so it cannot be null. The 'fk' object mentioned in that line is used in the line before, so it is also not null. That leaves just fk.getPrimaryKeyTable() as the possible null pointer. 

If I had to guess, I would say that somewhere in the database you are trying to generate a changelog for there is a foreign key that refers to a table that is not in the current schema or that the user connecting to the database does not have permissions for. But that is just a guess. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>