on ‎2022 Mar 03 8:49 AM
Hi,
I have seen some blog post where people are using java.io.Reader in Groovy to read the body content. For example:
def body = message.getBody(java.io.Reader)<br>body.eachLine { line -><br> .... Some code here <br>}
But then if I try the same code, I get the following error message:
javax.script.ScriptException: java.lang.Exception: java.lang.NullPointerException: Cannot invoke method eachLine() on null object@ line 26 in script1.groovy, cause: java.lang.NullPointerException: Cannot invoke method eachLine() on null object
Is there something that I missed?
EDIT: I realized it is error if I used conversion XML to CSV before the script step. If I remove the conversion step this error does not occur.
Thank you.
Request clarification before answering.
Hi Suwandi,
let us know your problem solved or new problem.
Warm regards, Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.