Oracle Database connectivity probem



Share on Google+Share on Google+

Rajesh Chauhan
Oracle Database connectivity probem
1 Answer(s)      6 years and a month 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
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
database connectivity
database connectivity  how to create database connectivity between HTML and sql server2005
database connectivity
database connectivity  describe java program steps in order to get connectivity to database along with example
servelet connectivity with oracle using procedure
servelet connectivity with oracle using procedure   kindly elaborate how servlet code connect to oracle br using procedure
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
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
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
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:
Database connectivity Hibernate mysql connection.
Database connectivity Hibernate mysql connection.  How to do database connectivity in Hibernate using mysql
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
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
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
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
File insertion into oracle database
File insertion into oracle database  How to Read and Insert a file (any format) into a Oracle database
storing csv into oracle database
storing csv into oracle database  i want jsp code for storing csv file into oracle database
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
Spring and Oracle Database
Spring and Oracle Database  I need example for Batch update process using oracle database and spring framework with full explanation
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
database connectivity - JDBC
database connectivity  example java code for connecting Mysql database using java  Hi friend, Code for connecting Mysql database using...+dbName,userName,password); System.out.println("Connected to the database
About DataBase Connectivity
About DataBase Connectivity  I want a simple code in which is like two tier application one system have data base and application is running on other system. Pls inform the way hoe to connect both system {I want to run