<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="ContactUsPU">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL57InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="none" />
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<!-- <property name="hibernate.connection.url" value="jdbc:mysql://localhost/bbholidays" /> -->
<property name="hibernate.connection.url"
value="jdbc:mysql://google/bbh_database?cloudSqlInstance=bbhwebapp:asia-southeast1:bbh-db&socketFactory=com.google.cloud.sql.mysql.SocketFactory&useSSL=false"/>
<property name="hibernate.connection.username" value="xxxxx" />
<property name="hibernate.connection.password" value="xxxxx" />
<property name="hibernate.archive.autodetection" value="class" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.use_sql_comments" value="true" />
<property name="hbm2ddl.auto" value="none" />
<property name="hibernate.connection.autocommit" value="true"/>
</properties>
</persistence-unit>
</persistence>
According to this thread in stackoverflow, this issue occurs when Hibernate is not able to connect to the database.
As the thread suggests, you can start with verifying if the database present at the server is being referred to the configuration file. Also please check if the username and password for connecting to the database is correct.