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?
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.