pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dmp <danap@ttc-cmc.net>
To: kfan <kfan.b1@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: getNotifications
Date: Fri, 17 Aug 2012 10:49:28 -0600
Message-ID: <502E7618.6040008@ttc-cmc.net> (raw)
In-Reply-To: <CAOtHd0AhB-DPHLjs4gS5=yocZDHngaYFVmzX7OuVierOU63Keg@mail.gmail.com>
References: <1345217428484-5720228.post@n5.nabble.com>
	<CAOtHd0ARk_1LsfYUQfLgd-as_bkFpjyw4E_yyQTcQdDyJ6s8dg@mail.gmail.com>
	<1345220585174-5720235.post@n5.nabble.com>
	<CAOtHd0AhB-DPHLjs4gS5=yocZDHngaYFVmzX7OuVierOU63Keg@mail.gmail.com>

kfan wrote:
> On Fri, Aug 17, 2012 at 9:23 AM, kfan<kfan.b1@gmail.com>  wrote:
>> It's not an exception, it's a compile error.  I am casting the connection
>> object to a PGConnection...interesting to note though that the methods
>> available on the PGConnection object only shows the addDatatype method.

Maciek Sakrejda wrote:
> It would help to see your code and the exception you're getting. My
> guess is you're not casting the Connection object you get back from
> DriverManager to a PGConnection, but that's a shot in the dark at this
> point.

Listener(Connection conn) throws SQLException {
       this.conn = conn;
       this.pgconn = (org.postgresql.PGConnection)conn;

I'm not sure, but I think I'm with Maciek's orginally response. I don't
think you're going to be able to cast a java.sql.Connection to PGConnection
then call one of the latter's methods.

danap.





view thread (13+ messages)  latest in thread

Message-ID: <502E7618.6040008@ttc-cmc.net>
Permalink:  ../502E7618.6040008@ttc-cmc.net/
Also on:    postgresql.org/message-id/502E7618.6040008@ttc-cmc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: danap@ttc-cmc.net, kfan.b1@gmail.com
  Subject: Re: getNotifications
  In-Reply-To: <502E7618.6040008@ttc-cmc.net>
  References: <1345217428484-5720228.post@n5.nabble.com> <CAOtHd0ARk_1LsfYUQfLgd-as_bkFpjyw4E_yyQTcQdDyJ6s8dg@mail.gmail.com> <1345220585174-5720235.post@n5.nabble.com> <CAOtHd0AhB-DPHLjs4gS5=yocZDHngaYFVmzX7OuVierOU63Keg@mail.gmail.com> <502E7618.6040008@ttc-cmc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox