Support Questions

Find answers, ask questions, and share your expertise

Error in JoltTransformJson - NullPointerException

avatar
New Contributor

Hi all,

 

I'm receiving an error when trying to use JoltTransformJson to include a pair key:value.

 

My spec is:

 

 

[
   {
       "operation": "default",
       "spec": {
              "contrato_id": ${contrato_id}
        }
   }
]

 

 

And the error is:

 

2021-03-01 13:43:08,211 ERROR [Timer-Driven Process Thread-5] o.a.n.p.standard.JoltTransformJSON JoltTransformJSON[id=f95619a1-10bb-1176-a8e2-74e530af8a4d] Unable to transform StandardFlowFileRecord[uuid=c87fd67d-007b-4e3a-8d02-34debe071241,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1614616788266-10770, container=default, section=530], offset=989501, length=492],offset=0,name=e18bba5f-6404-4eaa-92af-4061b55a912f,size=492] due to java.lang.NullPointerException: java.lang.NullPointerException

 

Could someone help me with this?

 

Thank you

 

1 REPLY 1

avatar
New Contributor

I found the mistake. My processor configuration was Default. When I put chain, it worked. 

My spec has "[ ]", so, he was an array, not just one spec.