Results 1 to 4 of 4

Thread: ClassNotFoundException Error in PostgreSQL

  1. #1
    Join Date
    Feb 2009
    Posts
    53

    ClassNotFoundException Error in PostgreSQL

    I am a complete newbie when it comes to using PostgreSQL and JDBC. I have successfully installed PostgreSQL on my Mac G4 running Mac OS X 10.1.

    I'm able to start the DB daemon (with -i extension), I've created and populated a database (can query the database, etc.). When I installed PostgreSQL, I created a user account named "Newuser" on my computer, and start the DB daemon while logged onto that account (in a console window after logging into the postgres account using 'su - Newuser'). I've downloaded the pre-compliled jdbc7.1-1.1.jar JDBC driver. I put the JDBC driver file in /usr/local/pgsql/share/java. I've been trying to use JDBC to connect to a database and started with examples available in the source file.

    When I try and run the executable after compilation I get an error. Specifically, the line of code in "Class.forName("org.postgresql.Driver");" returns the error "java.lang.ClassNotFoundException:

    I became nuke over here and cannot move ahead....

    Please help..Anybody come across this before..

  2. #2
    Join Date
    Dec 2008
    Posts
    69

    Re: ClassNotFoundException Error in PostgreSQL

    Hi,

    You need to Put the driver in /Library/Java/Home/lib/ext/ and see what happens. That's what the trick did for me.

    I'm still using 10.0.4, but I assume they didn't change that directory in 10.1.

  3. #3
    Join Date
    Jan 2009
    Posts
    143

    Re: ClassNotFoundException Error in PostgreSQL

    if you get a Java ClassNotFoundException error message when attempting to view a java applet in LearnUW.

    Most Mac OS browsers cannot support Java applets running under a secured environment (SSL) such as LearnUW.

    Try using the Safari browser (v. 1.2 or higher) under Mac OS 10.3 or higher. LearnUW currently cannot support Java applets on the Macintosh using Internet Explorer, Netscape, Mozilla, Firefox, or Safari version 1.1 or lower.

  4. #4
    Join Date
    Jan 2009
    Posts
    84

    Re: ClassNotFoundException Error in PostgreSQL

    I think you need to give the fully qualified name in your code attribute.

    Try something like:
    code="projects.web.TestAppletGUI"

Similar Threads

  1. Replies: 5
    Last Post: 27-08-2011, 10:36 PM
  2. How to connect to Postgresql database
    By Xziibit in forum Software Development
    Replies: 5
    Last Post: 05-08-2011, 02:01 PM
  3. Improvements in PostgreSQL 8.3
    By Calan in forum Software Development
    Replies: 5
    Last Post: 18-11-2010, 04:07 AM
  4. ClassNotFoundException Error in Java
    By Protectors in forum Software Development
    Replies: 5
    Last Post: 25-07-2010, 04:05 AM
  5. How to read from a PostgreSQL Python
    By Rebella in forum Software Development
    Replies: 3
    Last Post: 28-07-2009, 03:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,206,224.23982 seconds with 17 queries