Re: a little disillusioned

From: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
To: Frequency UnKnown <captainmofopants(at)hotmail(dot)com>
Cc: "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: a little disillusioned
Date: 2004-01-21 08:28:25
Message-ID: 20040121082825.A14300@bacon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On 21/01/2004 05:12 Frequency UnKnown wrote:
> well, my ploy failed. having never got a decent answer from any
> technical forum, i had to try.
>
> so back to the tried and tested method:
>
> can anyone explain to me why tomcat 5 will not find
> org.postgresql.Driver when it is definitely there?
>
> i know this is a very broad question but i have covered the obvious
> things like class path and such (which, i might add, is the worst part
> of Java invented). the only thing that seems to work for me is to
> extract the contents of the .JAR file into my $JAVAHOME. surely this is
> NOT the way to do it - otherwise the package wouldn't even come as a
> JAR. in fact, i've got plenty of other JARs working, such as the
> SmartUploader, SOAP handlers and the like.
>
> So what's the difference between me directly instantiating a class
> (which it seems i can do) and calling Class.forName()/createInstance()
> (or whatever it is) in terms of where Java looks for classes? as i said,
> the classpath for my system, for java, and for tomcat are all pointed to
> the place where I have put the JAR.

Stay away from classpaths with Tomcat - it uses its own class loaders and
you can really confuse it if you have your jar in the classpath too. What
I do (on Tomcat 4.1) is put the driver in common/lib and use connection
pooling via JNDI (if you do this _do not_ include the driver in your app
as well). Have you tried this approach? Have you tried running your app
under Tomcat 4.1?

> i'm running debian, if that helps.

IMHO, running anything other than M$ helps ;)

> PS: i will go elsewhere if i am in the wrong place too. is there a forum
> more related to my topic?

Maybe the Tomcat people could help?

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-01-21 09:44:32 Re: updatable resultsets -> SQLException: -1
Previous Message Guido Fiala 2004-01-21 08:10:41 Re: updatable resultsets -> SQLException: -1