MongoDb and Ignition: new module

Hi,

I am new to developing ignition modules (so please bear with my limited knowledge) and we are at a point in where we want to start developing our own modules. At the moment I am trying to re-create module that talks to MongoDB

I found the original instructions here: Ignition Programming: MongoDB in Ignition

I also found: Ignition Programming: Including Libraries in your Ignition Modules

From my understanding I just have to add the MongoDB library to my pom.xml file.

It built successfully, signed, and was able to install on Ignition gateway

However, when trying to run script from example I get error:

TypeError: ‘javapackage’ object is not callable

Am I missing something else for my module? I have included the IntelliJ source code

Thanks

Ken

mongo.zip (2.0 MB)

Hi Ken,

Can you post the script you are trying to execute? Also, is it gateway or client?

I took a look at your module and it looked ok at a glance (jars in the modl, and entries in the module.xml). If it installed and was running ok, could just be an error in your script.

Hi Perry,

I actually got it working. I realized instead of loading

mongo-java-driver I was loading mongo-driver

After updating module, I was able to write and read from mongo database using scripting

Ken

1 Like