Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

Oracle Database connectivity probem



Share on Google+Share on Google+

Rajesh Chauhan
Oracle Database connectivity probem
1 Answer(s)      6 years and 3 months ago
Posted in : JSP-Interview Questions

hi Below is the code of oracle database connectivity, when i compile it, it will show the error: oracle.jdbc.driver.OracleDriver I am using netbeans 6.5 and tomcat 6.0 and jdk 1.6 i have also set the environment variable like that .;E:\oracle\ora81\jdbc\lib\;E:\oracle\ora81\jdbc\lib\;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar;E:\oracle\ora81\jdbc\lib\

I am trying to solve the problem from last three to four week but still not success and still try

Please help me asap. Thanks in advance

package firstexample;

import java.sql.*;

public class FirstExample {

public static void main(String[] args) {
try {
      Class.forName ("oracle.jdbc.driver.OracleDriver");
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//rajesh-4d3ad07c/1521:Rajesh", "scott", "tiger");
      Statement stmt = conn.createStatement();

     // a select query
      ResultSet rset = stmt.executeQuery ("SELECT ename FROM emp");

while ( {
System.out.println("ENAME = " + rset.getString(1));


} catch (Exception e) {
System.out.println("ERROR : " + e.getMessage());
View Answers

January 19, 2012 at 6:42 PM

please send the error message what comes and try with the another oracle jar version ojdbc14.jar and put the semicolon at the end of the line in classpath value.


Related Tutorials/Questions & Answers:
Oracle Database connectivity probem
Oracle Database connectivity probem  hi Below is the code of oracle database connectivity, when i compile it, it will show the error... also set the environment variable like that .;E:\oracle\ora81\jdbc\lib
Database Connectivity Withe Oracle
Database Connectivity Withe Oracle  Develop a program to perform the database driven operation like insert, Delete, Update and select. To perform the above operations create one table named Employee. Field Name Field Type EmpId
oracle connectivity
oracle connectivity  con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","hr","hr"); i have error on above line when i tried...=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","hr","hr
oracle connectivity problem with netbeans
oracle connectivity problem with netbeans  sir I am using oracle.... for this after adding new driver(ojdbc6.jar) in services tab I got connectivity with oracle... of simple connectivity with oracle in this I am giving driver details
jdbc oracle connectivity problem
jdbc oracle connectivity problem  Hi All, I am trying to connect my swing application to oracle DB . but class.forname is giving error. Please suggest me if there is some different way to connect swing application to oracle
database connectivity
database connectivity  describe java program steps in order to get connectivity to database along with example
database connectivity
database connectivity  how to create database connectivity between HTML and sql server2005
JSP-Oracle connectivity
JSP-Oracle connectivity  I have created a "dynamic web project" mainly with jsp files in eclipse and now, want to connect with oracle 10g, so how can I proceed for the database connection
jsp page connectivity with oracle - SQL
jsp page connectivity with oracle  I am unable to database connectivity jsp with oracle. Please send the code for solving problem. thanks  Hi Friend, 1)Import the packages: 2)Load the oracle driver
servelet connectivity with oracle using procedure
servelet connectivity with oracle using procedure   kindly elaborate how servlet code connect to oracle br using procedure
Database Connectivity
Database Connectivity  I tried to establish database connection with sqlserver2008 through GlassFish server. When I set the path of sqljdbc.jar(E:\Glass Fish\glassfish-v2ur1\javadb\lib\sqljdbc.jar) it shows me error
database connectivity
database connectivity  i have written class.forName and getconnection in one method which returns connection string object under particular class and in someother class i want to call that for statement object
database connectivity
database connectivity  i m trying to connect this servlet with database but i m not able to Code is ot giving any error and there is no update in database plsss somebody can help code is here package newpackage; import
Java vs Oracle Connectivity - JDBC
Java vs Oracle Connectivity  Write a java program to establish connection with oracle database?  Hi Friend, Use Oracle with Java...("oracle.jdbc.driver.OracleDriver"); 3) Connect to database:*********** a) If you
storing csv into oracle database
storing csv into oracle database  i want jsp code for storing csv file into oracle database
File insertion into oracle database
File insertion into oracle database  How to Read and Insert a file (any format) into a Oracle database
database connectivity problem
database connectivity problem  what if client dont have database with them then what is other way to run successfully our programm   Please visit the following link:
how to solve this problem for oracle connectivity
how to solve this problem for oracle connectivity  Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap ter could not establish the connection
Spring and Oracle Database
Spring and Oracle Database  I need example for Batch update process using oracle database and spring framework with full explanation
Database connectivity Hibernate mysql connection.
Database connectivity Hibernate mysql connection.  How to do database connectivity in Hibernate using mysql
JDBC, Java Database Connectivity
tutorials. Java Database Connectivity or JDBC for short is Java bases API... implementations for each database. For example to access oracle database we need the JDBC... driver as per your application needs. About JDBC Java Database Connectivity
Access 2007 database connectivity
Access 2007 database connectivity  i design an application form... source and destination. pls tell me the code of connectivity with access 2007 database using JComboBox.thanks
database connectivity - JDBC
database connectivity  can u ppl pls provide me with database connectivity programs with MSacces   Hi Friend, If you havn't create your... a user DSN 4. Select Microsoft Access Driver(*.mdb) 5. Select database name
java with Oracle Database
java with Oracle Database  Hello I have been encountering a problem regarding creating a table with Oracle.When i am creating new table in the Database using Oracle , it is giving error saying an errror occured incursive sql
database connectivity using mysql
database connectivity using mysql  java file: package eg; import java.sql.*; public class eg1 { public static void main(String arg[]) throws SQLException { try { String connectionURL = "jdbc:mysql
OCI Connectivity For Oracle Plz Solve This Error
OCI Connectivity For Oracle Plz Solve This Error  import*; import java.sql.*; import java.lang.*; import oracle.jdbc.OracleDriver; public..."); con=DriverManager.getConnection("jdbc:oracle:thin
OCI Connectivity For Oracle Plz Solve This Error
OCI Connectivity For Oracle Plz Solve This Error  import*; import java.sql.*; import java.lang.*; import oracle.jdbc.OracleDriver; public..."); con=DriverManager.getConnection("jdbc:oracle:thin
Jdbc connectivity in java to oracle for retrieving data between two dates
Jdbc connectivity in java to oracle for retrieving data between two dates ... dates from the database table. I am using combo box to get the date. Problem..., while the date that is inserted to the database is in the format of 10/Apr/2012. I
C Program with Database Connectivity
C Program with Database Connectivity  How To Connect MySQL Database in C Program with Graphics
database connectivity in java - JDBC
database connectivity in java  import*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.sql.*; class Project implements ActionListener { JFrame f; JPanel p1,p2,p3; JTabbedPane
Oracle 9i database problem
Oracle 9i database problem  Hi Somebody has given the solution but i... Oracle 9i in my laptop.and i got sql+ page ok.i have gone to control panel->odbc->in that i correctley configured DNS and TNS and tested the Oracle