Highlighted

Problem in MySQL Connection

Avatar

Avatar

karthikbhat3624

Avatar

karthikbhat3624

karthikbhat3624

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

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
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

Highlighted

Avatar

Avatar

karthikbhat3624

Avatar

karthikbhat3624

karthikbhat3624

15-09-2018

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

Whether is there problem with AEM 6.4?

Highlighted

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

911

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

911

Correct Answer

1.0K
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

Highlighted

Avatar

Avatar

karthikbhat3624

Avatar

karthikbhat3624

karthikbhat3624

16-09-2018

Thank You for replying.

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