From: | Jon(dot)Roberts at asurion(dot)com (Roberts, Jon) |
---|---|
To: | |
Subject: | [Pljava-dev] emailing with pl/java |
Date: | 2008-05-05 20:00:51 |
Message-ID: | 1A6E6D554222284AB25ABE3229A92762E9A2D8@nrtexcus702.int.asurion.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
I read online someone else was having this problem with 1.6 so I removed
my JDK and installed 1.5. I have it working now. It might have been a
mismatch between the JRE too. 1.5 is OK for me for now.
Jon
> -----Original Message-----
> From: Lucas Madar [mailto:lucas at mcsnw.com]
> Sent: Monday, May 05, 2008 1:02 PM
> To: Roberts, Jon
> Cc: pljava-dev at pgfoundry.org
> Subject: Re: [Pljava-dev] emailing with pl/java
>
> Roberts, Jon wrote:
> > CREATE OR REPLACE FUNCTION control.fn_smtp(p_smtp_server varchar,
p_to
> > varchar, p_from varchar, p_subject varchar, p_body varchar) returns
> > varchar as
> > 'smtp.send(java.lang.String, java.lang.String, java.lang.String,
> > java.lang.String, java.lang.String)'
> > LANGUAGE 'java';
> >
> > It returns: "ERROR: IOException while sending message"
> >
> > What gives? Why doesn't this work in pl/java but works just fine
from
> > the command line?
> >
> I believe the security of the 'java' language is probably getting in
> your way. It doesn't allow you to open files, so it probably doesn't
> allow you to open socket connections, either. Try using the 'javau'
> language, which has no security checks:
>
> e.g. CREATE OR REPLACE FUNCTION control.fn_smtp ... LANGUAGE 'javau';
>
> Good luck,
> Lucas
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2008-05-08 04:53:05 | [Pljava-dev] Messages not posting to gmane.comp.db.postgresql.pljava |
Previous Message | Lucas Madar | 2008-05-05 18:01:33 | [Pljava-dev] emailing with pl/java |