Re: Postgres and J2EE

From: Daryl Beattie <dbeattie(at)insystems(dot)com>
To: "'marcin(dot)jerzy(at)wp(dot)pl'" <marcin(dot)jerzy(at)wp(dot)pl>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres and J2EE
Date: 2002-07-29 13:50:49
Message-ID: 4160E6FC08ABD21191F000805F857E9304DF4579@mail.insystems.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Marcin,

Actually, I would tend to believe that it is a configuratin problem
you are having. It sounds like JDBC can't find your driver to load when
somebody is trying to get a connection (or maybe J2EE trying to create at
DataSource), rather than a problem with the driver itself. Is it in the
classpath?
I have gotten the PostgreSQL JDBC2 driver working with JBoss 2.4, so
I can tell you that it does work with J2EE. Since I didn't use the Sun
reference J2EE server, I can't give you more contextual information, sorry.
You should not need to build the JDBC driver from source.
This is merely a problem of getting your application to use the JDBC
driver correctly.

Sincerely,

Daryl.

> -----Original Message-----
> From: marcin(dot)jerzy(at)wp(dot)pl [mailto:marcin(dot)jerzy(at)wp(dot)pl]
> Sent: Sunday, July 28, 2002 8:18 AM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] Postgres and J2EE
>
>
> Hi!
> Is there anybody who play with Postgres and Java 2 EE Platform? I have
> a problem with connecting my J2EE app server to Postgres server. When
> I call getConnection() method, it throws exception with message "no
> suitable driver". Below is appropriate piece of code:
>
> ic = InitialContext();
> ds = (DataSource)ic.lookup("java:comp/env/jdbc/mydb");
> db = ds.getConnection();
>
> I'm almost sure that it's not a problem with configuration of J2EE
> server, but with driver itself. But what could be wrong, if I
> downloaded Postgres driver from Postgres web site and there is written
> that it supports JDBC 2.0 API, particularly DataSource interface?
> Moreover, I've done exactly what they say in configuration manual...
>
> If there is anybody who have experience with J2EE and Postgres, PLEASE
> tell me, how You bring them together and force to work. Maybe there's
> some hook in configuration or should I build the driver from
> sources... I don't know, I have no idea :-(
>
> I use:
> - Postgres 7.2
> - J2EE - 1.3
> - J2SDK - 1.3.1
>
> Thanx
> MJS
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2002-07-29 13:53:43 Re: pg_controldata question
Previous Message Neil Conway 2002-07-29 13:50:24 Re: UDFs, table functions, returning rows