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
BedrockMission!

Learn More

View all

Sign in to view all badges

Problem in MySQL Connection

Avatar

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
View profile
karthikbhat3624
Level 2

15-09-2018

Hello,

I'm trying to use MySQL DB connection,

I've configured in OSGi also.

When I try to do

"@Reference

private DataSourcePool source"

it is giving null value to it, hence it is giving error while we try do source.getDataSource("DataBaseTravel");

I'm Using AEM 6.4v.

krishh_187smacdonald2008

Thanks in Advance

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,348 likes

Total Posts

3,226 posts

Correct Reply

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

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,348 likes

Total Posts

3,226 posts

Correct Reply

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

15-09-2018

Hi,

Please check your imports.

Below is sample code to get connection from DataSourcePool service.

aem63app-repo/DSConnectionImpl.java at master · arunpatidar02/aem63app-repo · GitHub

Avatar

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
View profile
karthikbhat3624
Level 2

15-09-2018

Thank you for replying, but still it is not working for me.

Whether is there problem with AEM 6.4?

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,112 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,112 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

16-09-2018

How have you configured your datasource? Do you see in the error.log the string "datasource" (check case-insensitiv!)

Jörg

Avatar

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
View profile
karthikbhat3624
Level 2

16-09-2018

Thank You for replying.

Now it is Working for me,the problem was in the mysql-connector version.