I need to connect to the Confluence databases to the extent where i can execute SQL queries and get results.
When attempting to create a JDBC connection in my user search plugin, I get the following error
java.sql.SQLException: No suitable driver found for jdbc/renderStatsDS
This is (i believe) because Confluence uses a resource on the server to connect automatically to it's database.
I've found the resource at opt/atlassian/confluence/conf/server.xml
<Resource name="jdbc/renderStatsDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://aveley.dhcp.dneg.com/renderstats?autoReconnect=true"
username="safety"
password="safety"
maxActive="25"
maxIdle="5"
maxWait="10000"
/>
Does anyone know how to access this resource?
Alternatively if anyone has any code they could share that has connected to the confluence database and been able to execute SQL via some other method, that would obviously be very helpful to me too.
Cheers, Matt