File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Java,Oracle on Solaris need Help Uragent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Java,Oracle on Solaris need Help Uragent" Watch "Java,Oracle on Solaris need Help Uragent" New topic

Java,Oracle on Solaris need Help Uragent


Joined: Feb 01, 2001
Posts: 6
I have installed JDK1.2.2 and oracle 8.1.6 on Solaris 2.8(Unix).
I am able to compile and execute simple java programs. Now Iam trying to run jdbc programs.
In order to do that I downloaded Oracle driver for Solaris and added classpath with Now my Jdbc programs as well as simple programs are compiling successfully but not executing. Any help to soleve this problem is appreciated.
gdgd% echo $CLASSPATH

gdgd% javac
gdgd% java Employee
Exception in thread "main" java.lang.NoClassDefFoundError: Employee

Sorce code for Employee.javaclass Employee
import java.sql.*;
class Employee
public static void main (String args [])
throws SQLException

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

Connection conn =
DriverManager.getConnection ("jdbc racle ci8:@servername.port.dbname", "scott", "tiger");

Statement stmt = conn.createStatement ();

ResultSet rset = stmt.executeQuery ("select ENAME from EMP");
while ( ())
System.out.println (rset.getString (1));



Thanks in Advance.
rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
The NoClassDefFoundError is usually thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found

Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link:
subject: Java,Oracle on Solaris need Help Uragent
jQuery in Action, 3rd edition