[Pljava-dev] Using JDBC in PL/Java 1.4.0: Statement.executeQuery() automatically closes the statement redux

From: tim(dot)clarke at manifest(dot)co(dot)uk (Tim Clarke)
To:
Subject: [Pljava-dev] Using JDBC in PL/Java 1.4.0: Statement.executeQuery() automatically closes the statement redux
Date: 2010-03-22 12:29:07
Message-ID: 4BA76293.5080101@manifest.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 12/03/10 13:35, Tim Clarke wrote:
>> I've been tracking down a problem where checking getWarnings() after an
>> executeQuery() in pljava and found an exchange on the list from 2008
>> that matches my symptoms exactly:
>>
>> http://pgfoundry.org/pipermail/pljava-dev/2008/001298.html
>> <http://pgfoundry.org/pipermail/pljava-dev/2008/001303.html>
>>
>> Kris Jurka replied swiftly and fixed the issue in the source tree. Was
>> this ever released live? I've just downloaded the latest:
>>
>> http://pgfoundry.org/frs/download.php/1597/pljava-i686-pc-linux-gnu-pg8.2-1.4.0.tar.gz
>>
>> To run against our PG 8.2.15 database and I'm still getting the problem.
>>
>>
>>
> I (think) I've managed to get a compile now using Eclipse and jdk1.5_10.
> Unfortunately when registering my java function calls using
>
> set search_path=voting;
>
> select sqlj.install_jar('file:///usr/local/manifest/vote.jar',
> 'vote', false);
> select sqlj.install_jar('file:///usr/share/java/log4j.jar',
> 'log4j', false);
> SELECT sqlj.set_classpath('voting', 'vote:log4j');
>
> CREATE or replace FUNCTION vote(AccountID int8, CapitalID int8,
> EventID int8, CanCopy bool, CopyFromEventID int8)
> RETURNS varchar
> AS 'uk.co.manifest.postgres.vote.VoteCalc.vote(long, long, long,
> boolean, long)'
> volatile LANGUAGE java;
>
> I get the error:
>
> java.lang.NoSuchMethodError: Method org.postgresql.pljava.internal.Portal._
> fetch(JZI)I
>
> on that first install_jar() call followed by "failed to create JVM" on
> any subsequent calls :-/ I've not found an answer by googling. Can
> anyone help?
>

Just for the record (the list's a bit quiet ;-) :

The answer was that the version of the pljava.so file was out of step. I
ran make from command line instead of trying to export from eclipse;
obviously that did not build the C object. I found the correct version
in the folder tree after running make at the command line.

--
Tim Clarke AMBCS MIAP
IT Director
Manifest
9 Freebournes Court
Newland Street
Witham, Essex
CM8 2BL
England

Phone: +44 1376 503500
Direct: +44 1376 504510
Fax: +44 1376 503550
Email: tim.clarke at manifest.co.uk <mailto:tim.clarke at manifest.co.uk>
Web: http://www.manifest.co.uk
Skype: callto:tim.clarke

Manifest is the trading name of: Manifest Information Services Ltd: Registered in England Number 3401145 & The Manifest Voting Agency Ltd:
Registered in England Number 2920820. Registered Office at above address. VAT Registration Number: GB 700 1880 77
Copyright: This e-mail may contain confidential or legally privileged information.
If you are not the named addressee you must not use or disclose such information, instead please report it to: admin at manifest.co.uk
Please see http://www.manifest.co.uk/legal/legal_notices.htm for further information.

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Susan M Farley 2010-03-24 15:34:28 [Pljava-dev] Function Error
Previous Message JOSE CARLOS MARTINEZ LLARIO 2010-03-19 15:48:02 [Pljava-dev] how to cancel a trigger operation