MySQL connection with AEM - No data source found with name '------'

Avatar

Avatar
Ignite 1
Level 1
saukaush
Level 1

Likes

2 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
Boost 1
View profile

Avatar
Ignite 1
Level 1
saukaush
Level 1

Likes

2 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
Boost 1
View profile
saukaush
Level 1

10-12-2020

I am trying to create MySQL connection from my servlet using Day Commons JDBC connections pool.

 

1. I created config manually from system/console/configMgr and tested my code. It worked fine. I added a new config from crx/de and both configs worked fine.

 

2. On another machine, i created the config first through crx/de and got below exception. com.day.commons.datasource.poolservice.DataSourceNotFoundException: No data source found with name 'retail' (after asking 0 providers)

I also tried creating config manually from system/console/configMgr but still the same exception.

 

What i have observed here is, if on any machine first config is created through system/console/configMgr, everything works fine, but when first config is created through crx/de i got exception.

 

Tested the same on 4 different machine, connection was successful on 2 as config was created using system/console/configMgr. on the other 2 machine, it keeps on failing as first connection created from crx/de.

 

Please suggest on the above issue.

Replies

Avatar

Avatar
Validate 1
Level 2
shaileshb584084
Level 2

Likes

14 likes

Total Posts

18 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 1
Level 2
shaileshb584084
Level 2

Likes

14 likes

Total Posts

18 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 10
View profile
shaileshb584084
Level 2

10-12-2020

Hi,

 

I tried creating the configuration directly through crx/de and it worked fine. I am using AEM 6.5.5.

 

Please check while you are creating the configuration, if the node is properly created or not. I tried under the path "/apps/system/config" and under the project specific run mode as well.

 

shaileshb584084_0-1607615926362.png

 

Thanks

 

Avatar

Avatar
Ignite 1
Level 1
saukaush
Level 1

Likes

2 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
Boost 1
View profile

Avatar
Ignite 1
Level 1
saukaush
Level 1

Likes

2 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
Boost 1
View profile
saukaush
Level 1

10-12-2020

Hi Shailesh, 

I see you have created the config as a nt:file. I have created sling:osgiConfig under /apps/myproject/config.

 

saukaush_0-1607661961249.png

 

Is it like import com.day.commons.datasource.poolservice.DataSourcePool Reference scans and stores only configs stored as nt:file?

 

and the strange thing is if i created the config manually from configMgr for a very first time on a machine, DataSourcePool scans and stores every config ( be it manual from configMgr or as osgiConfig in crxde). But if the very first config on a machine is created through crxde, DataSourcePool doesn't show up anything.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,444 likes

Total Posts

3,322 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,444 likes

Total Posts

3,322 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

11-12-2020

try to restart services after creating repository based config.