[Pljava-dev] Function Error

From: sfarley1 at gmu(dot)edu (Susan M Farley)
To:
Subject: [Pljava-dev] Function Error
Date: 2010-03-24 15:34:28
Message-ID: f89282645423.4ba9eab4@gmu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

I'm trying to import a function in Java, but am having problems with it. The java function is

public static double chi2cdf (double x)
{
return chi.cdf(x);
}

I copied the sim.class file to the Postgres data directory and I added it to Postgres with the following
select sqlj.replace_jar('file:///D:/workspace/SimplePrediction/sim.jar','sim',true);

SELECT sqlj.set_classpath('public', 'sim');

CREATE OR REPLACE FUNCTION sim.chi2cdf(double precision)
RETURNS double precision
AS 'simpleMonteCarlo.sim.chi2cdf'
LANGUAGE java;

When I try to run it, I get the following error:
ERROR: Unable to find static method simpleMonteCarlo.sim.chi2cdf with signature (D)D

I thought it was the signature of double precision, but then tried it with two other functions, one a float and one a int and get similar errors. Does anyone have any ideas?

Thank you,
Susan

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Roberts, Jon 2010-03-24 16:01:30 [Pljava-dev] Function Error
Previous Message Tim Clarke 2010-03-22 12:29:07 [Pljava-dev] Using JDBC in PL/Java 1.4.0: Statement.executeQuery() automatically closes the statement redux