SQL for Confluence - MS sql connection not working

Dhanasekaran Balasubramaniam June 16, 2015

Hi,
I am configuring SQL for confluence plugin but i am getting the below error. 
Error rendering macro 'sql-query' : Unable to load database driver: net.sourceforge.jtds.jdbc.Driver. Make sure your configuration is correct

Followed steps:
Step 1: Placed jtds-1.3.1.jar under lib directory. 
Step 2: updated the context.xml under conf with the below. 
<Resource name="jdbc/InventoryDB" 
auth="Container" 
type="javax.sql.DataSource"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://servername:1433/dbname;instance=UAT"
username="username"
password="password"
maxActive="10"
maxIdle="10"
validationQuery="Select 1"
/>

Step 3: restarted Tomcat

Step 4: in the sql plugin configuration screen updated the information.

Add a profile named: InventoryDB
with profile value:

dbDriver=net.sourceforge.jtds.jdbc.Driver | dbUrl=jdbc:jtds:sqlserver://servername:1433/wiki;instance=UAT| dbUser=username|dbPassword=password| dbJar=lib/jtds-1.3.1.jar

Can Some one Please let me know if i am missing anything from my end ?

1 answer

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2015

First, you only need one of these configurations. Either application defined data source (your first 3 steps) or the data source profile configuration. See Data Sources for more information.

In your case, the data source profile configuration will override the other configuration. I suspect you Confluence server is on Windows. Suggest setting the dbJar to the full path name to the jar file. 

If you still have problems, please open a support issue.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events