🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.databases
Article #56

Re: JDBC for postgresql HELP !!! ClassNotFoundException

#56
From: LRebello
Date: Fri, 21 Jul 2000 00:00
46 lines
2538 bytes
Sarah,

There has to be a problem with the class path, it gets trickier in the
servlet enviornment. Make sure that if you are using the
class.forName().newInstance that the servlet engine's class path points to
the right jar. Additionally as you might know, .jar files are in zip format
and you can view the files with winzip to make sure they contain what you
need. Finally you can use the jar file and use "import [pakage.class]" to
import into you application the class and instantiate the driver class
manually. I am not familiar with the enviornment your in or the drivers but
this is a generic java solution and I hope it helps.


Sarah <ic@clara.net> wrote in message news:396F09E0.DCE65F08@clara.net...
> Dear all
>
> I would not forward this message to a newsgroup if I need some serious
> help.
>
> I have just reinstalled my Linux Mandrake 7.1 with
> J2SE
> Java Servlet Development Kit + servletrunner
> PostgreSQL 6.5.3 with the JDBC6.5-1.1.jar and JDBC6.5-1.2.jar.
>
> I was able to access the database via if I run the class file under the
> console using
> Class.forName("postgresql.Driver");.
>
> However, if I run this under servlet, it would throws a
> ClassNotFoundException and failed to connect upto the database. My Psql
> is running postmaster -i (accept TCP/IP).
>
> Is this something wrong with the classpath ? I have added almost all the
>
> jar files I could see into the classpath!!!
>
>
>
>
>
>
> Thanks in advance
>
> Sarah
> IC
>
Technical Details
Message-ID: <XQ4e5.77328$7I1.1361103@news1.rdc2.on.home.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <396F09E0.DCE65F08@clara.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fdf7d,d3a6a2c245977135
X-Google-Attributes: gidfdf7d,public
X-Google-Thread: 107d46,f77135b4bae68f2
X-Google-Attributes: gid107d46,public
X-Google-Thread: fb99b,d3a6a2c245977135
X-Google-Attributes: gidfb99b,public
From: "LRebello" <lrebello@home.com>
Subject: Re: JDBC for postgresql HELP !!! ClassNotFoundException
Date: 2000/07/21
Message-ID: <XQ4e5.77328$7I1.1361103@news1.rdc2.on.home.com>
X-Deja-AN: 649293420
References: <396F09E0.DCE65F08@clara.net>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-Complaints-To: abuse@home.net
X-Trace: news1.rdc2.on.home.com 964221367 24.64.136.148 (Fri, 21 Jul 2000 16:16:07 PDT)
Organization: Corridor MicroSystems Inc.
X-MSMail-Priority: Normal
Reply-To: "LRebello" <lrebello@home.com>
NNTP-Posting-Date: Fri, 21 Jul 2000 16:16:07 PDT
Newsgroups: comp.lang.java.databases,cz.comp.lang.java,microsoft.public.java.visualj++.wfc.database,microsoft.public.java.visualj++.wfc.database