Thread: PostgreSQL and Tomcat?
I have been successfully running Java code against a PostgrSQL server running under CygWin, on a W2K PC, and am wondering if it is possible to run Servlets the same way? I have some test code that keeps failing when connecting to the server - the message I am getting is Error: JDBC Class creation: null Truthfully I am not sure where to put the pgjdbc2.jar file - I have tried D:\Program Files\Apache Tomcat 4.0\Lib D:\Program Files\Apache Tomcat 4.0\Common D:\Program Files\Apache Tomcat 4.0\Server\Lib D:\Program Files\Apache Tomcat 4.0\Server\Classes or whether I need to tweak the Tomcat config to get it to load? With normal Java code I put it in... D:\j2sdk1.4.0\jre\lib\ext but can't find anything similar! Any advice would be appreciated, I am pulling my hair out <g> Keep up the good work Chris Parsons
Hi Chris, Put the pgjdbc2.jar in the following directory: D:\Program Files\Apache Tomcat 4.0\Common\lib That's it. Regards, Satish. --- Chris Parsons <cparsons@spamcop.net> wrote: > I have been successfully running Java code against a > PostgrSQL server > running under CygWin, on a W2K > PC, and am wondering if it is possible to run > Servlets the same way? > > I have some test code that keeps failing when > connecting to the server - the > message I am getting is > Error: JDBC Class creation: null > > Truthfully I am not sure where to put the > pgjdbc2.jar file - I have tried > > D:\Program Files\Apache Tomcat 4.0\Lib > D:\Program Files\Apache Tomcat 4.0\Common > D:\Program Files\Apache Tomcat 4.0\Server\Lib > D:\Program Files\Apache Tomcat 4.0\Server\Classes > > or whether I need to tweak the Tomcat config to get > it to load? > > With normal Java code I put it in... > > D:\j2sdk1.4.0\jre\lib\ext > > but can't find anything similar! > > Any advice would be appreciated, I am pulling my > hair out <g> > > Keep up the good work > > Chris Parsons > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
Thank for all the advice folks! You all agreed that the JAR file ought to go in TomCat's 'common\lib' directory, which is encouraging, so I have moved it, and restarted TomCat but still no joy! I have also changed the code to use the ODBC driver to PostgreSQL and get the same error - do I have to do any configuration in TomCat to use PostgreSQL - for instance, set up a 'realm' or something?? Cheers Chris Parsons
> and get > the same error - What is the error? -Nick -------------------------------------------------------------------------- Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/
Chris, Did you restart tomcat? Dave On Thu, 2002-07-25 at 11:34, Parsons, Chris wrote: > Thank for all the advice folks! > > You all agreed that the JAR file ought to go in TomCat's 'common\lib' > directory, which is encouraging, > so I have moved it, and restarted TomCat but still no joy! > > I have also changed the code to use the ODBC driver to PostgreSQL and get > the same error - do I have > to do any configuration in TomCat to use PostgreSQL - for instance, set up a > 'realm' or something?? > > Cheers > > Chris Parsons > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > >