[Pljava-dev] Trigger problem

From: macolman at tiscali(dot)co(dot)uk (Mark Colman)
To:
Subject: [Pljava-dev] Trigger problem
Date: 2006-04-23 09:56:00
Message-ID: 000001c666bc$20246a20$ef00a8c0@DUR.AC.UK
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2006-04-23 10:27:20 [Pljava-dev] Trigger problem
Previous Message Thomas Hallgren 2006-04-23 08:11:04 [Pljava-dev] pljava-1.3dev compile problem