Thread View: comp.lang.java.databases
2 messages
2 total messages
Started by Sarah
Fri, 14 Jul 2000 00:00
JDBC for postgresql HELP !!! ClassNotFoundException
Author: Sarah
Date: Fri, 14 Jul 2000 00:00
Date: Fri, 14 Jul 2000 00:00
31 lines
1626 bytes
1626 bytes
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
Re: JDBC for postgresql HELP !!! ClassNotFoundException
Author: LRebello
Date: Fri, 21 Jul 2000 00:00
Date: Fri, 21 Jul 2000 00:00
46 lines
2538 bytes
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
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads