Posts

Showing posts with the label ORACLE

JNDI configuration for Tomcat 9 with Oracle

In this article, I am going to place the required source code to get data from the table by using the JNDI configuration. Below are the environment details that I have configured currently. Windows - 7 Oracle - 10g Tomcat - 9 JDK - 8 Eclipse Oxygen Ojdbc6 jar required First, we need to create the Dynamic Web Project. If you don't know how to do <Click Here>. I have faced a lot of issues before getting the output like 405, No driver class to load, etc. I am using JSP & Servlets in the current explanation. Before started writing the application logic, we need to do the below configuration in the installed tomcat directory. Place OJDBC6.jar in the Tomcat LIB directory. Add this Resource under <GlobalNamingResources> in Server.xml file which is present under the conf directory in Tomcat. < Resource name = "jdbc/myoracle" global= "jdbc/myoracle" auth = "Container" type= "javax.sql.DataSource" driverClass...

Hibernate CRUD operations with example

Read this article to know what is CRUD and how to do CRUD operations in hibernate with example. CRUD stands for Create, Read, Update and Delete. As part of hibernate learning CRUD operations are the most basic operations. In previous examples, I have explained by using the MySQL configuration in Hibernate. But, in the current example, I am explaining by using Oracle as well as MySQL configuration. The choice is yours, use at your convenience. As of you people already know if we have to change the Database vendors no need to rewrite the entire code, it’s just a configuration file change. So, except the hibernate.cfg.xml file remaining all files logic will be common for both of the databases like Oracle or MySQL. Before going to write the hibernate logic, we have small work with the databases either Oracle or MySQL. Execute the below query to create the table in the database. Before going to execute the below query make sure you have connected with the specific Schema in the dat...