MySOL Connection Issue | Adobe Higher Education
Skip to main content
Level 5
May 6, 2020
Risolto

MySOL Connection Issue

  • May 6, 2020
  • 1 risposta
  • 3210 visualizzazioni

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 :

 

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 .

 

 
 

Could you please help me out . Thank you.

Questo argomento è stato chiuso alle risposte.
Migliore risposta di user05162

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

1 risposta

user05162Adobe EmployeeRisposta
Adobe Employee
May 6, 2020

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