Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

ERROR:

Oct 25, 2020 7:40:55 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.4.9.Final}
Oct 25, 2020 7:40:56 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager
INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Oct 25, 2020 7:40:57 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

Servlet File

String title = request.getParameter("title");
String content = request.getParameter("content");
			
Configuration cfg = new Configuration().configure();
SessionFactory sf = cfg.buildSessionFactory();
Session session = sf.openSession();
Transaction transaction = session.beginTransaction();
Note note = new Note(title, content, new Date());
session.save(note);
transaction.commit();
System.out.println("Record inserted");
System.out.println(note);
session.close();

hibernate.cfg.xml

<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:rushi</property>
<property name="hibernate.connection.username">system</property>
<property name="hibernate.connection.password">rushi</property>
        
<property name="hbm2ddl.auto">create-drop</property>
<property name="show_sql">true</property>
<property name="hibernate.format_sql">true</property>

<mapping class="com.entities.Note"/>

Please help to resolve this issue

You didn’t post what kind of environment you are running in, but I assume it’s a custom one or Tomcat/Jetty? You should configure a connection pool like described here: https://docs.jboss.org/hibernate/stable/orm/userguide/html_single/Hibernate_User_Guide.html#database-connectionprovider-datasource or even better, use an environment like a Java EE server(Wildfly, Payara) that comes with connection pooling configuration out of the box.