MySOL Connection Issue

Avatar

Avatar

arvind

Avatar

arvind

arvind

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

jbrar

Employee

Avatar

jbrar

Employee

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)