Got Null pointer exception while using ga.nlp.annotate

Using 3.5.14 Neo4J and using all 3.5.14 Jars for plugins
I am getting the NullPointerException when I call ga.nlp.annotate. I followed the instructions from GitHub - graphaware/neo4j-nlp: NLP Capabilities in Neo4j

MATCH (n:News)
CALL ga.nlp.annotate({text: n.text, id: id(n)})
YIELD result
MERGE (n)-[:HAS_ANNOTATED_TEXT]->(result)
RETURN result

Error:Failed to invoke procedure ga.nlp.annotate : Caused by: java.lang.RuntimeException: No pipeline null

security.log
neo4j.log
debug.log
image

Hi!

Have you set a default pipeline?

CALL ga.nlp.processor.pipeline.default("my_pipeline")

Otherwise, I think you need to add an extra parameter in ga.nlp.annotate:

MATCH (n:News)
CALL ga.nlp.annotate({
     text: n.text, 
     id: id(n), 
     //checkLanguage: false, 
     pipeline : "my_pipeline"
}) YIELD result
MERGE (n)-[:HAS_ANNOTATED_TEXT]->(result)

In both cases, the pipeline "my_pipeline" was added using the ga.nlp.processor.addPipeline procedure.

I have tried adding a default pipeline,

Neo.ClientError.Procedure.ProcedureCallFailed

Failed to invoke procedure ga.nlp.processor.pipeline.default: Caused by: java.lang.NullPointerException

Alright, you can check that there is a pipeline named "my_pipeline" with

CALL ga.nlp.processor.getPipelines()

Otherwise, I don't have other ideas to explain this error for now :frowning:

My pipleline was "customStopWords" :stuck_out_tongue:

1 Like

have you fixed this? I am having the same issues atm

Java should test for a Null and then report some useful error msg.

The fact that some problem is occurring (and not gracefully handled) in the Java implementation is a bug which has been reported here: Failed to invoke procedure `ga.nlp.annotate`: Caused by: java.lang.RuntimeException: No pipeline null · Issue #159 · graphaware/neo4j-nlp · GitHub