pg.ddx.io  pljava-dev@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Subject: [Pljava-dev] unable to invoke sample pljava program.
Date: Thu, 01 Nov 2012 05:03:41 -0700
Message-ID: <2F817EC8-493F-4942-A6E0-159BF2F632EA@me.com> (raw)
In-Reply-To: <CAOxerh6nrRM7UQFFRSGb5LLqap8=uBTcWXcsG1mBiQdkxoR7CA@mail.gmail.com>
References: <CAOxerh6nrRM7UQFFRSGb5LLqap8=uBTcWXcsG1mBiQdkxoR7CA@mail.gmail.com>

You need to add the parameter type to the java signature in the definition. 

Sent from my Tricorder

On Oct 31, 2012, at 9:56 PM, "Nalamothu, Bhaskar" <bhaskar_nalamothu at pro-hemns.com> wrote:

> Dear Dev Team,
> 
> i am beginner for pljava. i am struggling a lot to invoke a simple pljava program.
> 
> i have done the following things successfully. 
> 
> 1.Sample java class which is having a static method as follows
> 
> public static String hello(String hello){
>         return hello;
>     }
> 
> 2.Installed the jar  
> 
> SELECT sqlj.install_jar('file:///D:/Program Files/PostgreSQL/9.1/lib/PLJAVA_Custom.jar', 'PLJAVA_Custom',  true);
> 
> jar is loaded into jar_repository table of sqlj schema and also classes are identified and loaded into jar_entry table of sqlj Schema,
> 
> 3. Set the Classpath successfully
> 
> SELECT sqlj.set_classpath('public', 'PLJAVA_Custom');
> 
> 4. I have created a sample function as follows
> 
> CREATE OR REPLACE FUNCTION handle_data2(character varying)
>   RETURNS character varying AS
> 'pljavaone.DataHandler.hello'
>   LANGUAGE java VOLATILE
> 
> when i am executing its returning me the following error ERROR:  java.lang.ClassNotFoundException: pljavaone.DataHandler. 
> 
> Thanks in advance.
> 
> --
> Sudha Bhaskar N
> Procreate Techno Systems pvt ltd
> +91-9948-678-222
> 
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pljava-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20121101/d68ee234/attachment.html;



view thread (2+ messages)

Message-ID: <2F817EC8-493F-4942-A6E0-159BF2F632EA@me.com>
Permalink:  ../2F817EC8-493F-4942-A6E0-159BF2F632EA@me.com/
Also on:    postgresql.org/message-id/2F817EC8-493F-4942-A6E0-159BF2F632EA@me.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] unable to invoke sample pljava program.
  In-Reply-To: <2F817EC8-493F-4942-A6E0-159BF2F632EA@me.com>

* 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