# Got Null pointer exception while using ga.nlp.annotate

**URL:** <https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753>\
**Category:** Neo4j Graph Platform\
**Created:** [March 13, 2020, 4:04am UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753 "2020-03-13T04:04:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sudeepdas235](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sudeepdas235/32/9756_2.png) [@sudeepdas235](https://community.neo4j.com/u/sudeepdas235)\
**Post date:** [March 13, 2020, 4:04am UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/1 "2020-03-13T04:04:49Z")

</div>

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](https://github.com/graphaware/neo4j-nlp)

```auto
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](https://github.com/graphaware/neo4j-nlp/files/4323427/security.log)  
[neo4j.log](https://github.com/graphaware/neo4j-nlp/files/4323429/neo4j.log)  
[debug.log](https://github.com/graphaware/neo4j-nlp/files/4323430/debug.log)  
[![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/2X/7/74c08f1fc24eeb905e8854dd1db76a4924b8be3f.png)](https://user-images.githubusercontent.com/12708378/76508670-bcdb3080-6489-11ea-8f1e-5c28a97d31ab.png)

---

<div class="post-metadata">

**Author:** ![Estelle](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/estelle/32/33070_2.png) [@Estelle](https://community.neo4j.com/u/Estelle)\
**Post date:** [March 13, 2020, 5:51pm UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/2 "2020-03-13T17:51:55Z")

</div>

Hi!

Have you set a default pipeline?

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

```

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![sudeepdas235](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sudeepdas235/32/9756_2.png) [@sudeepdas235](https://community.neo4j.com/u/sudeepdas235)\
**Post date:** [March 14, 2020, 3:47am UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/3 "2020-03-14T03:47:12Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/2X/3/311b4d6235bb31f961ab2a0c04cbc0436c3b659e.png)

---

<div class="post-metadata">

**Author:** ![Estelle](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/estelle/32/33070_2.png) [@Estelle](https://community.neo4j.com/u/Estelle)\
**Post date:** [March 14, 2020, 7:35am UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/4 "2020-03-14T07:35:05Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![sudeepdas235](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sudeepdas235/32/9756_2.png) [@sudeepdas235](https://community.neo4j.com/u/sudeepdas235)\
**Post date:** [March 15, 2020, 3:54am UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/5 "2020-03-15T03:54:48Z")

</div>

> [@Estelle](#):
>
> amed "my\_pipeline"

My pipleline was "customStopWords" 😛

---

<div class="post-metadata">

**Author:** ![taylangezici1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/taylangezici1/32/16486_2.png) [@taylangezici1](https://community.neo4j.com/u/taylangezici1)\
**Post date:** [February 2, 2021, 7:50am UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/6 "2021-02-02T07:50:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![clem](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/clem/32/4364_2.png) [@clem](https://community.neo4j.com/u/clem)\
**Post date:** [February 2, 2021, 4:32pm UTC](https://community.neo4j.com/t/got-null-pointer-exception-while-using-ga-nlp-annotate/15753/7 "2021-02-02T16:32:28Z")

</div>

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](https://github.com/graphaware/neo4j-nlp/issues/159)
