agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] NPE using existing TriggerData ResultSet
Date: Mon, 03 Oct 2005 09:38:25 +0800
Message-ID: <43408B91.1080509@tokuii.com> (raw)

Hi,

I was trying to use the existing postgresql connection from TriggerData 
in Trigger function trying to write some data back to postgresql (in 
another table) by using:

public static void triggerFunction(TriggerData td)
{
  .
  ResultSet _rsnew = td.getNew();
  .
  .
  .
  function(_rsnew.getStatement().getConnection());   //<========= (NPE here)
  .
  .
}


private static function (java.sql.Connection conn)
{
  .
  .
  .
}

However, I am getting NPE at statement 
"_renew.getStatement().getConnection()".

Is this a bug? Do you have another solution to reuse existing postgresql 
connection?

Thanks a lot for helping.

Regards,
Kong




view thread (2+ messages)  latest in thread

Message-ID: <43408B91.1080509@tokuii.com>
Permalink:  ../43408B91.1080509@tokuii.com/
Also on:    postgresql.org/message-id/43408B91.1080509@tokuii.com

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 using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] NPE using existing TriggerData ResultSet
  In-Reply-To: <43408B91.1080509@tokuii.com>

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

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