agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Trigger problem
Date: Sun, 23 Apr 2006 10:56:00 +0100
Message-ID: <000001c666bc$20246a20$ef00a8c0@DUR.AC.UK> (raw)
In-Reply-To: <444B357C.7010805@tada.se>

Hi Thomas,
> My guess would be that you have a jar containing the 
> javax.mail stuff on 
> the classpath when you compile and run your test harness but 
> you never 
> load this jar into your database. The JVM is then unable to 
> instantiate 
> your SendMail class since it's depedent on Message, MimeMessage, etc.

You're absolutely right.  I have now executed

Select
sqlj.install_jar('file:///c:/j2sdk1.4.2_09/lib/Mail.jar','Mail',true);
Select
sqlj.install_jar('file:///c:/j2sdk1.4.2_09/lib/Activation.jar','Activation',
true);
Select sqlj.set_classpath('public','Activation:Mail:SendMail');

The old error has been replaced by:

server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

Which I guess means my SendMail.send method is faulty in some way.  Any
further suggestions?  In particular, could I amend my exception handler to
write any error messages to the PostgreSQL log file?

Mark




view thread (8+ messages)  latest in thread

Message-ID: <000001c666bc$20246a20$ef00a8c0@DUR.AC.UK>
Permalink:  ../000001c666bc$20246a20$ef00a8c0@DUR.AC.UK/
Also on:    postgresql.org/message-id/000001c666bc$20246a20$ef00a8c0@DUR.AC.UK

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] Trigger problem
  In-Reply-To: <000001c666bc$20246a20$ef00a8c0@DUR.AC.UK>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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