From: | Barry Lind <barry(at)xythos(dot)com> |
---|---|
To: | Nikola Milutinovic <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu> |
Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Problems setting up PostgreSQL and Tomcat JDBC connection |
Date: | 2001-10-22 20:03:50 |
Message-ID: | 3BD47BA6.10805@xythos.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
What docs are you reading that say this? This used to be the case in
6.5 of postgres, but the main class has been org.postgresql.Driver since
7.0.
thanks,
--Barry
Nikola Milutinovic wrote:
> Hi all.
>
> I'm crossposting this to two mailing lists, I think poth parties are concerned.
>
> Finaly got some time to work on my project on Tomcat and I ran into problems.
> Mostly these problems stem from the inconsistent documentation that accompanies
> Tomcat 4.0 distribution. And it would appear that PostgreSQL is also in error
> (see below).
>
> I have:
>
> - Tru64 UNIX 4.0D (a.k.a. Digital UNIX)
> - Java 1.3.0 SDK
> - Tomcat 4.0 final release
> - PostgreSQL 7.1.0
> - PostgreSQL JDBC 2.0 compliant driver
>
> QUESTION 1: How do I go about setting it up with Tomcat?
>
> I have tried the following:
>
> - placed postgresql.jar in ${CATALINA_HOME}/common/lib/
> - added CATALINA_OPTS="-Djdbc.drivers=postgresql.Driver"
> - restarted Tomcat
>
> My JSP file is:
>
> <%-- My first go at PostgreSQL and JSP --%>
> <%@ page info="test" import="java.sql.*, javax.sql.*" %>
> <%!
> Connection conn = DriverManager.getConnection(
> "jdbc:postgresql://localhost/mercury", "test", "test00" );
> String query = "SELECT * FROM div";
> %>
>
> [SNIP]
>
> </html>
>
> When I run it, I get the following error:
>
> -------------------------------------------------------------------
> org.apache.jasper.JasperException: Unable to compile class for JSP
> ...
>
> Root Cause:
>
> java.lang.NumberFormatException: postgresql
> ...
> -------------------------------------------------------------------
>
> This would imply that I'm either using a wrong connection string or the driver
> isn't loaded, right?
>
> QUESTION 2: Now this may sound dumb, but... PostgreSQL docs state that I should
> load driver with "-Djdbc.drivers=posgresql.Driver", but if I list postgresql.jar
> file, I see it is "org.postgresql.Driver". Is this a typo in the docs?
>
> Nix.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-10-22 20:07:44 | Re: [GENERAL] To Postgres Devs : Wouldn't changing the select limit |
Previous Message | Mike Mascari | 2001-10-22 20:00:03 | Re: [GENERAL] To Postgres Devs : Wouldn't changing the select |