cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Daniels" <denn...@hotmail.com>
Subject Re: postgrsql jdbc error
Date Fri, 30 Mar 2001 18:16:19 GMT
Donald

Cocoon is now talking to the database. Thanks a bunch!
cheers
denny


>From: Donald Ball <balld@webslingerZ.com>
>Reply-To: cocoon-users@xml.apache.org
>To: <cocoon-users@xml.apache.org>
>Subject: Re: postgrsql jdbc error
>Date: Thu, 29 Mar 2001 14:41:31 -0500 (EST)
>
>On Thu, 29 Mar 2001, Dennis Daniels wrote:
>
> > With JDBC, a database is represented by a URL (Uniform Resource 
>Locator).
> > With Postgres, this takes one of the following forms:
> >
> >     * jdbc:postgresql:database
> >     *
> >       jdbc:postgresql://host/database
> >     *
> >       jdbc:postgresql://hostport/database
> > where:
> >
> > host
> >
> >     The hostname of the server. Defaults to "localhost".
> > port
> >
> >     The port number the server is listening on. Defaults to the Postgres
> > standard port number (5432).
> > database
> >
> >     The database name.
>
>right, and your database url looks like this:
>
>jdbc:postgresql://world:8080/db/dtw
>
>obviously incorrect.
>
> > To connect, you need to get a Connection instance from JDBC. To do this, 
>you
> > would use the DriverManager.getConnection() method:
> >
> > Connection db = DriverManager.getConnection(url,user,pwd);
> >
> > Naturally we tried all of the variants on this theme. None of them 
>worked.
>
>generally, you do this:
>
><dburl>jdbc:postgresql://hostname/databasename</dburl>
><username>whatever</username>
><password>whatever</password>
>
> > Could it be a class path problem?
>
>no, you would have gotten a ClassNotFoundException or something along
>those lines.
>
>- donald
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message