I am attempting to create my own confluence plugin and am running into issues when trying to connect to the embedded H2 database in my java class. I wish to establish a connection with the database so that I may create a new table to store important information for my application. However, I have run into a road block where my plugin cannot seem to find a suitable driver for the connection. I was successfully able to establish a connection using DBVisualizer, but am still struggling within the plugin. Any help is apprciated.
I would very strongly recommend that you do not do this. You should never write anything directly to an Atlassian database while it is running. You will corrupt your data, even if you're using your own tables.
Your app should use Active Objects instead - with these, you don't have to think about the database connection, Confluence does all of that for you.
Thank you for your response.
I fear that (at first glance) it only solves half of my issue. I was also planning to reading information from the database as well. Specifically, I am planning on reading information from the Questions for Confluence plugin as described here. If I am mistaken please inform me (I am in the process of reading the Active Object documentation). If not, can you please provide me with a solution to my original issue or an alternative solution. Thanks, I appreciate your help.
P.S. - I should also mention that I am using the h2 embedded database for testing purposes and will eventually be making use of an external database when my plugin is actually installed.
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events