Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return value of "cz.startnet.utils.pgdiff.schema.PgSchema.getRelation(String)" is null #283

Open
dan-aksenov opened this issue Jul 15, 2021 · 1 comment

Comments

@dan-aksenov
Copy link

dan-aksenov commented Jul 15, 2021

Running on MacOS:
java -jar apgdiff-2.6.0.jar one.sql another.sql
have:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "cz.startnet.utils.pgdiff.schema.PgRelation.addRule(cz.startnet.utils.pgdiff.schema.PgRule)" because the return value of "cz.startnet.utils.pgdiff.schema.PgSchema.getRelation(String)" is null
	at cz.startnet.utils.pgdiff.parsers.CreateRuleParser.parse(CreateRuleParser.java:74)
	at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:275)
	at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:311)
	at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:35)
	at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

Java version:

➜  ~ java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment Homebrew (build 16.0.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 16.0.1+0, mixed mode, sharing)
@m-grigas
Copy link

I am having a similar issue:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "cz.startnet.utils.pgdiff.schema.PgTable.getConstraint(String)" because the return value of "cz.startnet.utils.pgdiff.schema.PgSchema.getTable(String)" is null
	at cz.startnet.utils.pgdiff.parsers.CommentParser.parseConstraint(CommentParser.java:96)
	at cz.startnet.utils.pgdiff.parsers.CommentParser.parse(CommentParser.java:36)
	at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:260)
	at cz.startnet.utils.pgdiff.loader.PgDumpLoader.loadDatabaseSchema(PgDumpLoader.java:311)
	at cz.startnet.utils.pgdiff.PgDiff.createDiff(PgDiff.java:35)
	at cz.startnet.utils.pgdiff.Main.main(Main.java:39)

Java version:

java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants