You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Sharon Dagan <sh...@il.ibm.com> on 2002/02/10 20:16:35 UTC

Problems with Hello World mailet

Hi all,

I've just installed JAMES v2.0a2 - I have it up and running.
I've written a 'Hello World' mailet, JARed it and placed it into '<JAMES
HOME>/lib'.

My mailet looks like this:

  package com.ibm.il.snd.wts.mailets;
  public class HelloWorld extends GenericMailet {
    public void service(Mail mail) throws MessagingException {
    }
  }

I've added the following to '<JAMES HOME>/apps/james/conf/config.xml':

  ...
  <mailetpackage>com.ibm.il.snd.wts.mailets</mailetpackage>

  ...

  <mailet match="RecipientIs=en2de@sdagan-pc1.azorim.il.ibm.com" class
="HelloWorld">
  </mailet>


Now JAMES starts but wont initialize the POP/SMPT/whatever listeners.
The logs are clean and indicate that 'HelloWorld' has been initialized.
If I replace 'HelloWorld' with 'Null' JAMES starts OK.
Same thing happens with JAMES v2.0a1.

Any ideas?

Cheers,
--
Sharon Dagan
IT Architect, Software Group
IBM Israel

e: sharon_dagan@il.ibm.com
p: +972-3-9188776 m: +972-52-554776



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problems with Hello World mailet

Posted by Darrell DeBoer <li...@bigdaz.com>.
> Last I looked, Mailets can\not be installed by dropping them in the lib
> path.  I had to dig through the archives after spinning my wheels for
> several hours with the same problem you ran into...  James cannot find
> your mailet's class file and thus James craps out... Painful, as it must
> sound you have to compile your mailet, and add it to james block archive
> (james-root/dist/apps/james/blocks/james.bar.)  You might even go as far
> as adding your new james.bar to the james.sar (james-
> root/dist/apps/james.sar) so that the sar can be unpacked when first
> run, and thus the james path created under james-root/dist/apps.

Hi
AFAIK, this is still the case. James 2.0a2 runs on top of the Phoenix
application server, and there are still a few issues which need to be
resolved. (remember, this is alpha software :) )
ciao
Daz



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problems with Hello World mailet

Posted by "Michael J. Walsh" <ja...@nemonik.com>.
Sharon,

You'll probably have your question answered by others, but I had the 
same problem starting out with James.

Last I looked, Mailets can\not be installed by dropping them in the lib 
path.  I had to dig through the archives after spinning my wheels for 
several hours with the same problem you ran into...  James cannot find 
your mailet's class file and thus James craps out... Painful, as it must 
sound you have to compile your mailet, and add it to james block archive 
(james-root/dist/apps/james/blocks/james.bar.)  You might even go as far 
as adding your new james.bar to the james.sar (james-
root/dist/apps/james.sar) so that the sar can be unpacked when first 
run, and thus the james path created under james-root/dist/apps.

The best way to do all this is use Jakarta-Ant to help automate the 
process.  This is what I did.  Oh, and use NetBeans.  :-)  I love their 
Ant integration.

Cheers,

-Michael


On Sunday, February 10, 2002, at 02:16 PM, Sharon Dagan wrote:

> Hi all,
>
> I've just installed JAMES v2.0a2 - I have it up and running.
> I've written a 'Hello World' mailet, JARed it and placed it into '<JAMES
> HOME>/lib'.
>
> My mailet looks like this:
>
>   package com.ibm.il.snd.wts.mailets;
>   public class HelloWorld extends GenericMailet {
>     public void service(Mail mail) throws MessagingException {
>     }
>   }
>
> I've added the following to '<JAMES HOME>/apps/james/conf/config.xml':
>
>   ...
>   <mailetpackage>com.ibm.il.snd.wts.mailets</mailetpackage>
>
>   ...
>
>   <mailet match="RecipientIs=en2de@sdagan-pc1.azorim.il.ibm.com" class
> ="HelloWorld">
>   </mailet>
>
>
> Now JAMES starts but wont initialize the POP/SMPT/whatever listeners.
> The logs are clean and indicate that 'HelloWorld' has been initialized.
> If I replace 'HelloWorld' with 'Null' JAMES starts OK.
> Same thing happens with JAMES v2.0a1.
>
> Any ideas?
>
> Cheers,
> --
> Sharon Dagan
> IT Architect, Software Group
> IBM Israel
>
> e: sharon_dagan@il.ibm.com
> p: +972-3-9188776 m: +972-52-554776
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:james-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:james-user-
> help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>