Confluence - Configure Database

Hi,

 

I have a problem. I try configure Confluence, but I don't know what do in step "Configure Database".

I check options "java:comp/env/jdbc/DataSourceName" and "jdbc/DataSourceName". Still I can see this same error:

Setup Datasource Database Failed

The following error(s) occurred:

 
  • Could not lookup datasource successfully: com.atlassian.config.bootstrap.BootstrapException: Couldn't locate Datasource (java:comp/env/jdbc/) in the initial context. An object was bound to this name but whatever we found, it wasn't a Datasource:

Anyone can help me?

2 answers

0 vote

What database are you trying to connect to, and what connection settings are you giving to Confluence?

  • Did you restart after changing the server.xml file?
  • Can you show us the section of your server.xml file which describes the datasource, after hiding the passwords?

                      Yes, I did  restart server. I use postgresql. database.

                       server.xml :

                       <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
                        username="username"
                        password="password"
                        driverClassName="org.postgresql.Driver"
                        url="jdbc:postgresql://localhost:5432/database"
                        maxActive="20"
                        maxIdle="10"
                        validationQuery="select 1" />

 

                       I have file /atlassian/confluence/lib/postgresql-9.2-1004.jdbc4.jar on serer.

                       I add some text on end file /atlassian/confluence/confluence/WEB-INF/web.xml:

        <description>Connection Pool</description>

        <res-ref-name>jdbc/confluence</res-ref-name>

        <res-type>javax.sql.DataSource</res-type>

        <res-auth>Container</res-auth>

    </resource-ref>

 

 

 

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

253 views 11 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you