From: macolman at tiscali.co.uk (Mark Colman) Date: Sun, 23 Apr 2006 10:56:00 +0100 Subject: [Pljava-dev] Trigger problem In-Reply-To: <444B357C.7010805@tada.se> Message-ID: <000001c666bc$20246a20$ef00a8c0@DUR.AC.UK> 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