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,
Is there any way that you have figured out the issue?
I am also facing the same issue
Please let me know if you find any solution
Thanks
Shiva
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.