Receiving Error message: "org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException" while using Run script in Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2020 04:29 AM
Hi,
We have requirement to update database table fields based on catalog item input variables. I created Run script in workflow of cat item, as below :
var acc = "ABC~"+current.<variable_Name>;
var gr = new JDBCProbe("midserver_name");
gr.setDataSource("<Datasource sysID>");
gr.setFunction("UPDATE");
gr.setTable("<TableName>");
gr.setWhereClause(<wherecondition>);
gr.addField("field0 ", "A");
gr.addField("field1","updatetime");
gr.create();
During execution of it, I am receiving an error as:
Run Script(sysID of script): org.mozilla.javascript.WrappedException: Wrapped org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException (<refname>; line 17)
Let me know if anyone has faced similar issue and how to fix it.
Pankaj
- Labels:
-
Orchestration (ITOM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2020 05:33 AM
Below blog regarding JDBC probe will be useful plz check
Mark my ANSWER as CORRECT and HELPFUL if it helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2020 03:30 AM
HI,
Which is line 17 in your code? Are you sure you are passing value in that line. It seems that variables value is null.
Thakns,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2021 07:38 AM
Hi psjajda,
Were you able to find solution for this issue. We are facing exactly same issue while sending SMS notification. Line#17 error. which is totally unknown.