Expand my Community achievements bar.

SOLVED

How to connect external database in cq5..

Avatar

Level 3

Hi,

 

I am trying to connect to the mysql database from my cq5.6.1.

I have done all configurations in the system/console/config related to the jdbcconnectionpool config..

And my dsn name is "sqdb". Here i am not able to get the datasource sqdb into my servlet using ,

dataSource = (DataSource) dataSourceService.getDataSource("sqdb");

I have followed this article http://helpx.adobe.com/experience-manager/using/datasourcepool.html

Can anybody help me on this.

 

Thanks,

Sony C

1 Accepted Solution

Avatar

Correct answer by
Level 10

What is happening when you invoke the OSGi bundle that injects a DataSourcePool?

Are you getting errors in the log file? If so - please post the error message. 

Also -- make sure that you deploy your Database driver file into an OSGi bundle and deploy that to CQ.

Try restarting CQ after you set the Database configurations and deployed the OSGi bundle. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

What is happening when you invoke the OSGi bundle that injects a DataSourcePool?

Are you getting errors in the log file? If so - please post the error message. 

Also -- make sure that you deploy your Database driver file into an OSGi bundle and deploy that to CQ.

Try restarting CQ after you set the Database configurations and deployed the OSGi bundle.