cancel
Showing results for 
Search instead for 
Did you mean: 

Got Null pointer exception while using ga.nlp.annotate

sudeepdas235
Node Link

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
2X_7_74c08f1fc24eeb905e8854dd1db76a4924b8be3f.png

1 ACCEPTED SOLUTION

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

View solution in original post

6 REPLIES 6

Estelle
Ninja
Ninja

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

My pipleline was "customStopWords"

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

clem
Graph Steward

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 nul...