samuvack / ldes-grar

1 stars 1 forks source link

repository is null #1

Closed MPParsley closed 1 year ago

MPParsley commented 1 year ago

When starting the Apache NiFi flow I get this error:

nifi-graph  | java.lang.NullPointerException: Cannot invoke "org.eclipse.rdf4j.repository.Repository.getConnection()" because "repository" is null
nifi-graph  |   at be.vlaanderen.informatievlaanderen.ldes.processors.RDF4JRepositoryMaterialisation.onTrigger(RDF4JRepositoryMaterialisation.java:87)
nifi-graph  |   at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
nifi-graph  |   at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1357)
nifi-graph  |   at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
nifi-graph  |   at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
nifi-graph  |   at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
nifi-graph  |   at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
nifi-graph  |   at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
nifi-graph  |   at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
nifi-graph  |   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
nifi-graph  |   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
nifi-graph  |   at java.base/java.lang.Thread.run(Thread.java:833)

It seems like the graphdb repository wasn't properly initialised? https://github.com/samuvack/ldes-grar/blob/main/graphdb/init-graphdb.sh

samuvack commented 1 year ago

Indeed. Did you create an new GraphDB repository 'grar'?

samuvack commented 1 year ago

image

image

But then repository 'grar' instead of 'verkeersboete :)

samuvack commented 1 year ago

Please go to this repo for the latest working GRAR -> graphDB demo: https://github.com/Informatievlaanderen/SmartDataAcademyDemos

MPParsley commented 1 year ago

After running the command in the bash file from this repo, I have a repository named "vsds": image

samuvack commented 1 year ago

looking at the nifi flow file: "properties":{"Named graph":"","Repository ID":"grar","REF4J remote repository location":"http://graphdb3:7200"}

The name of the repository needs to be 'grar'

samuvack commented 1 year ago

I will change this. Thanks for the feedback