0
votes

Am trying to setup JDBC Datasource in Glassfish Admin Console as demonstrated here -

https://javatutorial.net/configure-glassfish-mysql

But am seeing the below error upon trying to ping from Glassfish.

Ping Connection Pool failed for MySQLOnOracle. Connection could not be allocated because: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Please check the server.log for more details.

Am using GlassFish Server Open Source Edition 5.0 (build 25) and MySQL 8.0 with MySQL Connector/J 8.0.

In the admin console, Datasource Classname is set to -

com.mysql.cj.jdbc.MysqlDataSource

Under JDBC Connection Pool Properties, the following properties are configured -

password - <password>
databaseName - <dbName>
URL - jdbc:mysql://<public_ip>:3306/<dbName>
Url - jdbc:mysql://<public_ip>:3306/<dbName>
datasourceName - <dbName>
user -  root

Can someone please help?

1
<jdbc-connection-pool datasource-classname="com.mysql.cj.jdbc.MysqlDataSource" name="MySQLOnOracle" res-type="javax.sql.DataSource"> <property name="password" value="*********"></property> <property name="databaseName" value="learndb"></property> <property name="URL" value="jdbc:mysql://144.xx.6x.xxx:3306/learndb"></property> <property name="Url" value="jdbc:mysql://144.xx.6x.xxx:3306/learndb"></property> <property name="datasourceName" value="learndb"></property> <property name="user" value="root"></property> </jdbc-connection-pool>Larsen

1 Answers

0
votes

After setting

useSSL = false,

ping was successful.