
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2018 09:05 AM
Hi Folks,
I am trying to develop a POC in my personal ServiceNow instance and facing issue with MID server Java Call. So, to give an overview of what I am trying to do...
-> I am trying to call Java class file from MID server and return the results in ServiceNow instance to build some reports and charts.
-> To do this, I have installed and configured my MID server.
-> Deployed JAR file into ServiceNow instance (verified it in ~/extlib/ folder as well)
-> Start the MID Server and make sure it is up and running.
-> Call my java class by defining a "Queue" of JavascriptProbe. This is how my queue code looks like
<parameters>
<parameter name="script" value="var wsc = new Packages.com.client.TestClass(); wsc.searchByAttributes('Bobby','Jones','null','null','null');"/>
</parameters>
-> That particular java class in MID server has a line of code to load System library. (System.loadLibrary("G2"))
-> I have also verified that library is available in MID server "java.library.path" and also placed it under /usr/lib/ and /usr/lib/x86_64-linux-gnu/
After all these setup, when I executed the queue, no matter what I get below output all the time.
Evaluation error: JavaScript evaluation error on:
var wsc = new Packages.com.client.TestClass(); wsc.searchByAttributes('Bobby','Jones','null','null','null');
Root cause of JavaScriptException: java.lang.UnsatisfiedLinkError
Please let me know how can I load libray in MID server from ServiceNow queue? Is there any alternate way to accomplish this? Any thoughts are greatly appreciated!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 07:18 PM
I couldn't fix this issue since this involves accessing System Libraries of MID server in Service Now server. So, I have hosted API in MID server as Web Service and was able to access it outside without any issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2019 11:24 AM
does any one have any insights on this? Any help is greatly appreciated!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2019 07:18 PM
I couldn't fix this issue since this involves accessing System Libraries of MID server in Service Now server. So, I have hosted API in MID server as Web Service and was able to access it outside without any issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2020 12:48 AM
Hi Ebe,
Could you please elaborate step-by-step what exactly you did?