Receiving SQLException for no Suitable H2 Driver in Confluence Plugin

Jaden Zerbe December 2, 2019

Hello,

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.

Thanks!

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2019

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.

Jaden Zerbe December 4, 2019

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events