• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Another JDBC:Oracle problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have probrably read every single post regarding this issue. I've followed every single suggestion but it still doesnt work for me. Can someone please help me figure out why I keep getting the error message:
Exception in thread "main" java.lang.NoClassDefFoundError: MakingTheConnection
When I run javac MakingTheConnection.java it compiles it without a problem. As soon as I type java MakingTheConnection then the exception error pops up. Here is the code:
import java.sql.*;
public class MakingTheConnection {
public static void main(String[] args) {

try {
Class.forName("oracle.jdbc.driver.OracleDriver");

Connection databaseConnection =
DriverManager.getConnection("jdbc racle:thin:@maxcorp1:1524:maxdb", "SYS", "password");

System.out.println("Connection established successfully!");

databaseConnection.close();
}
catch (ClassNotFoundException cnfe) {
System.err.println(cnfe);
}
catch (SQLException sqle) {
System.err.println(sqle);
}
}
}
I'm running it on a Windows XP machine. I configured the classpath and path properly but now i'm all out of ideas. PLEASE HELP OUT A GREENHORN........
Thanks!
 
maximillion2000
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind... I solved the problem.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"maximillion2000",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements.
Thanks.
Dave
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic