Third party module not found by gateway

Hello,
I’ve compiled a module for HTMLUNIT by gargoyle software. It works great when called from a project script, but the module is not found when calling from a gateway script. The scope is set for designer and gateway. Did I miss something?
Thanks

<?xml version="1.0" encoding="UTF-8"?> gargoylesoftware gargoylesoftware HTMLUNIT-Headless Browser 2.1.8 7.7.1 6 true commons-codec-1.10.jar commons-collections-3.2.1.jar commons-io-2.4.jar commons-lang3-3.4.jar commons-logging-1.2.jar cssparser-0.9.16.jar htmlunit-2.18.jar htmlunit-core-js-2.17.jar httpclient-4.5.jar httpcore-4.4.1.jar httpmime-4.5.jar jetty-io-9.2.12.v20150709.jar jetty-util-9.2.12.v20150709.jar nekohtml-1.9.22.jar sac-1.3.jar serializer-2.7.2.jar websocket-api-9.2.12.v20150709.jar websocket-client-9.2.12.v20150709.jar websocket-common-9.2.12.v20150709.jar xalan-2.7.2.jar xercesImpl-2.11.0.jar xml-apis-1.4.01.jar fpmi

This is only working by chance right now.

The client and designer have a flat ClassLoader hierarchy - any jar loaded into it is available everywhere. The gateway uses a hierarchical set of ClassLoaders, and the jars for your module get loaded underneath a special ClassLoader created for your module. All the jars your module depends on are not just available to the rest of the gateway (the scripts, in your case) like they are in the client and designer.

You need to add scripting functions that expose the functionality of the libraries you’re trying to add in order to use them from gateway scoped scripts. See the scripting example for more info.

A couple of notes:

You probably want “C” scope on your dependencies as well, unless you don’t plan for the scripts to work in the client.
Depending on “fpmi” in “G” scope is probably not what you want - you probably want “CD”, if anything.

can the jar files be copied to C:\Program Files\Inductive Automation\Ignition\lib\core\gateway and then restart the gateway?

Hi Kevin, I want to automate some webcrawling/scraping to automagically send meeting request to my calendar app whenever it finds a *.ics file on a website/page. this keeps me in the loop of several industry events/developments without having to spend significant time manually digging these out.

HtmlUnit converted to jython seems to be a good fit, but I’m early in the research process. I value your (and many others’) opinion, so wondering if this is a good use case from within Ignition to do what I’m trying to do?

One of the challenges I’ve run into so far is the ubiquitous use of scripting in webpages, so just being able to read the static html is not sufficient to get at the content you want. Python has kept up with this but it’s beyond Jython’s ability without pulling in non-standard Java libraries, unless you know of improvements in Java 11 that address this.

I’ve tried OpenRefine, which seems promising, but still learning to use it, and not sure how I’ll automate it within Ignition. I know it’s not a core focus of Ignition, so if you have more pressing issues, pls attend to them first.

Thanks.

Best,
Dan