Trying to create a standalone application using Hibernate 3.0 and Oracle 10g. The Client Application, POJO class, Mapping File and Configuration File are placed in the same folder, and all the required jar files including ojdbc14.jar are included in the classpath. Compilation is Fine, but during execution throwing HibernateException: JDBC Driver class not found: oracle.jdbc.driver.OracleDriver.
The driver_class, url, username, password are mapped in configuration file and using the same in normal jdbc application able to insert data in the table. But in this case it is throwing exception.
The ojdbc14.jar has been copied from the Oracle installation folder and placed in a folder named Libraries. The jar has been added to the classpath. I am able to write/run normal jdbc applications and even the same in Struts application. But in case of Hibernate it is generating exception.
Deepak Kumar Jena wrote:I am compiling the files using javac in command prompt. The hibernate.jar and ojdbc14.jar are placed under the same folder i.e. C:\Libraries and both has been added to the classpath.
That has nothing at all to do with errors which happen at run time.
I am getting error during compilation (Not using Ant). The jar files are placed in the classpath and they are visible in command prompt (using classpath). Database is also up. I have doubts about the version of the JARS. Suggest about all the required JARS with version detail.
I am using javac *.java at the command prompt. The POJO class (EmployeeBean.java) is getting compiled into .class file while the Hibernate Client Application (EmployeeClient.java) is throwing Exception during compile-time.
Actually, I am interested in compiling the files manually through Command prompt, but not interested in using tools like Ant for this purpose.
I am looking forward to debug the issue to find out the root cause. Using tools to avoid the errors is not a good move. As per my knowledge the issues are related to the dtd schema (XML) and may be specific to the environment (jar versions, classpath settings,etc). Even the same Exception is getting generated in MyEclipse.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop