How to connect different DB schema from Plugin?

Hello sailors,

I’m relatively new to Plugin Framework of IIQ.
I want to create plugin to get data from different database schema(other than IIQ , let’s call it IIQX) and perform some CRUD operations.

Things I have tried:

  1. Created Spring Boot API for rest endpoints , needed to connect to IIQX . If I test it as standalone application from my IDE, I’m able to perform all operation. But when I package it as jar and store that in /lib folder of Plugin and then zip the plugin to install it in IIQ instance ,
    I’m getting “method not allowed” error.(Also nothing in logs to check what went wrong)
    If I remove the jar component from Plugin , and only deploy frontend part, it’s getting installed successfully.

  2. I have check in compass for various free plugins they use jakarta restful webservices , so do I need to convert to this to jakarta restful webservices?
    If we want to use Jakarta restful webservices , how can we use properties files to getConnection to DB ?

The plugins have their jars in the ‘jars’ folder, not in the lib folder.

$ unzip -l build/dist/environmentStatusPlugin.0.1.23.zip
Archive:  build/dist/environmentStatusPlugin.0.1.23.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  10-30-2023 09:42   db/
...
        0  10-30-2023 09:42   jars/
        0  10-30-2023 09:42   ui/
...
     2543  10-30-2023 09:42   jars/environmentStatusPlugin.jar
     6320  10-30-2023 09:42   manifest.xml
        7  10-30-2023 09:42   ui/css/plugin.css
...
---------                     -------
    45867                     35 files

A nice introduction to plugins can be found here: https://www.youtube.com/watch?v=Mbi5i-KMhwQ

An example plugin (with build script) can be found here: GitHub - menno-pieters-sp/Environment-Status-Plugin: A simple example plugin

To reach out to an external database, you can use standard Java methods to open a JDBC connection. See for example: https://www.baeldung.com/java-jdbc.

  • Menno

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.