Executing a file with graql console - Null Pointer Exception


#1

I’ve built my schema in a single .gql file that I’m trying to load using graql console -k mykeyspace -f schema.gql however I’m getting a NullPointerException every time. The full stack trace is:

java.lang.NullPointerException
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:63)
    at ai.grakn.graql.internal.antlr.GraqlBaseVisitor.visitQuery(GraqlBaseVisitor.java:35)
    at ai.grakn.graql.internal.parser.QueryVisitor.visitQuery(QueryVisitor.java:111)
    at ai.grakn.graql.internal.parser.QueryParser$2.visit(QueryParser.java:295)
    at ai.grakn.graql.internal.parser.QueryParser$QueryPart.parse(QueryParser.java:350)
    at ai.grakn.graql.internal.parser.QueryParser$1.computeNext(QueryParser.java:204)
    at ai.grakn.graql.internal.parser.QueryParser$1.computeNext(QueryParser.java:193)
    at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
    at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
    at java.util.Iterator.forEachRemaining(Iterator.java:115)
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at ai.grakn.engine.session.GraqlSession.lambda$executeQuery$4(GraqlSession.java:221)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

I’ll post the problematic file once I’ve sanitised it, but does anyone have and general things to look at? I’m running Grakn using the official Docker container.