MySOL Connection Issue

Avatar

Avatar
Boost 5
Level 2
arvind
Level 2

Likes

7 likes

Total Posts

34 posts

Correct reply

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

Avatar
Boost 5
Level 2
arvind
Level 2

Likes

7 likes

Total Posts

34 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Give Back
Ignite 1
Boost 3
Validate 1
View profile
arvind
Level 2

06-05-2020

Dear Team,

I have come across below issue:

 

AEM version : 6.5.0

MySQL Version : 8.0.20

 

I have done my MySQL schema connection successfully using "Day Common JDBC Connections Pool " as below :

arvind_0-1588767347102.png

 

and when I execute my JSP code below , i get "Connection done" message.

JSP Code:

 

<%
DataSourcePool dspService = sling.getService(DataSourcePool.class);
try {
DataSource ds = (DataSource) dspService.getDataSource("aemform");
if(ds != null) {
%><p>Obtained the datasource!</p><%
%><%
out.println("Trying to get connection Connection done");
final Connection connection = ds.getConnection();
out.println("Connection done");

}
}catch (Exception e) {

}

%>

ISSUE:

Now , when I do same configuration using "Apache Sling Connection Pooled DataSource". I do not get "Connection Done" output from JSP , I mean connection is not getting established .

 

issue.png

 
 

Could you please help me out . Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

389 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

06-05-2020

I would recommend setting DEBUG logger on the PID's of both configs and check what's going on in the logs.

Answers (0)