Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM 6.5 No data source found with name

Avatar

Level 1

Hello, I was trying to connect MySQL to AEM using Service but I got problem while doing it. Can you help me identify where the problem is?
DatabaseService.java

carlp80611821_0-1627552667374.png

Here's my the datasource configuration

carlp80611821_1-1627552816891.png

and the bundle that I've been using for the driver class

carlp80611821_2-1627552909253.png

Here's the error I got from logger of my service.

com.ravens.core.servlets.DatabaseService ERROR OCCURED {}
com.day.commons.datasource.poolservice.DataSourceNotFoundException: No data source found with name 'my database' (after asking 0 providers)

Thank you in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @carlp80611821,

You should use an OSGi configuration named "Day commons JDBC Connections Pool" instead of Apache Sling Connection Pooled DataSource

Vijayalakshmi_S_0-1627565744569.png

Official Documentation related to this subject - https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/jdbc.html?lang=en

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @carlp80611821,

You should use an OSGi configuration named "Day commons JDBC Connections Pool" instead of Apache Sling Connection Pooled DataSource

Vijayalakshmi_S_0-1627565744569.png

Official Documentation related to this subject - https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/jdbc.html?lang=en