public inbox for [email protected]  
help / color / mirror / Atom feed
[Pljava-dev] Help in Installing PLjava
2+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] Help in Installing PLjava
@ 2015-06-19 04:29  
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2015-06-19 04:29 UTC (permalink / raw)

Hi,

I have installed PostgresSQL on Linux and also followed the steps as mentioned in the link below to install PLJava.
http://www.javacodegeeks.com/2012/10/introduction-to-postgresql-pljava.html


I have created a sample Java function as mentioned below

CREATE FUNCTION getsysprop(VARCHAR)   RETURNS VARCHAR   AS 'java.lang.System.getProperty'   LANGUAGE java;


and when I execute this function [SELECT getsysprop('user.home');]
I am getting the error "Do you want to attempt to reconnect to the database" with option yes or no.




Anil Kumar Krishna | Sr. Project Manager
Zenith Software Limited
Phone: +91 80 25525690
Mobile: +91 9972585161
Email: anilk at zenithsoft.com<mailto:anilk at zenithsoft.com> URL: www.zenithsoft.com<http://www.zenithsoft.com;


________________________________
DISCLAIMER: The information contained in this e-mail is confidential and is intended for use by the addressee only. Any views or opinions presented in this e-mail are solely those of the author and may not necessarily reflect the opinions of Zenith Software Limited. Any unauthorised dissemination or copying of this e-mail and any use or disclosure of information contained in it, is strictly prohibited and may be illegal. Please let us know immediately by return e-mail, if the e-mail has been sent to you in error.

________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20150619/be7485bd/attachment-0001.html;



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [Pljava-dev]  Help in Installing PLjava
@ 2015-07-20 01:05  
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2015-07-20 01:05 UTC (permalink / raw)

Anil K Krishna wrote:
> I have installed PostgresSQL on Linux and also followed the steps as
> mentioned in the link below to install PLJava.
> http://www.javacodegeeks.com/2012/10/introduction-to-postgresql-pljava.html
>
> I have created a sample Java function as mentioned below
>
> CREATE FUNCTION getsysprop(VARCHAR)   RETURNS VARCHAR   AS
> 'java.lang.System.getProperty'   LANGUAGE java;
>
> and when I execute this function [SELECT getsysprop('user.home');]
> I am getting the error "Do you want to attempt to reconnect to the
> database" with option yes or no.

Ouch! That indicates that in trying to run your function, the backend
crashed. That's outside of the set of Things That Ought to Happen, and
generally won't, in a Java Virtual Machine, so normally an event like
that would point into the relatively small portion of PL/Java that runs
as native code.

But ... I skimmed the article you were following, and I see that it
suggested a distribution of PL/Java built with gcj instead of a normal
Java runtime, and gcj makes _everything_ into native code. Also, while
I haven't used it myself, I have seen unflattering notes about its
stability. Also, I noticed that article claimed that PL/Java can be
used as a 'trusted' language, and indeed the docs on the PL/Java site
say it can be, *but only when not built with gcj*.

Your test in my environment (with a vanilla Oracle JRE) does what you'd
expect:

SELECT getsysprop('user.home');
     getsysprop
---------------------
 /var/lib/postgresql

So (if you haven't already solved your problem or gone another way),
I would suggest as a very first test, try a vanilla installation with
a conventional JRE, and see if that works better.

Regards,
-Chap



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-07-20 01:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 04:29 [Pljava-dev] Help in Installing PLjava 
2015-07-20 01:05 [Pljava-dev]  Help in Installing PLjava 

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