Results 1 to 2 of 2
  1. #1
    ravian is offline Senior Member
    Join Date
    Nov 2007
    Posts
    115
    Rep Power
    0

    Default java.lang.ClassNotFoundException

    I am trying to establish a JDBC connection with a PostgreSQL database. The following line of code fails.

    Java Code:
    Class.forName("org.postgresql.Driver").newInstance();
    Exception:
    Java Code:
    Exception in thread "main" java.lang.ClassNotFoundException: org.postgresql.Driver
    I have installed Post
    greSQL and it is workiing perfectly fine.

    What is the problem here.

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    Classpath is the problem .. Do you have postgres driver jar file in class path ?
    dont worry newbie, we got you covered.

Similar Threads

  1. Replies: 6
    Last Post: 02-19-2010, 02:57 PM
  2. Replies: 2
    Last Post: 09-18-2008, 08:30 AM
  3. Replies: 0
    Last Post: 03-21-2008, 02:13 PM
  4. Replies: 1
    Last Post: 07-24-2007, 12:54 AM
  5. Replies: 1
    Last Post: 06-27-2007, 06:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •