You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mailet-api@james.apache.org by Meir Rotstein <me...@rotstein.co.il> on 2012/07/08 11:21:49 UTC

Adding custom mailet on v3 beta 4

Hello,

I'm trying to add new simple custom mailet by
following<http://james.apache.org/server/3/dev-extend-mailet.html>this
guide instructions, also added to the mailetcontainer.conf the
following line, as needed:
<mailet match="All" class="mypackage.MyMailetClass"/>

I packed the mailet project into a jar file and copied it to
the \apache-james-3.0-beta4\conf\lib folder - this should be enough for
adding my jar into the classpath as according to
this<http://james.apache.org/server/3/config-mailetcontainer.html>the
mailetcontainer.xml configuration is not needed.

Bottom line - when I start the James server it fail to restart and I see a
ClassNotFoundException for my mailet class in the mailetcontainer.log.

What I'm missing here?

Thanks,
Meir.

Re: Adding custom mailet on v3 beta 4

Posted by Ioan Eugen Stan <st...@gmail.com>.
Hello Meir,

It's a known class-path issue affecting beta4. It's fixed in trunk:
https://issues.apache.org/jira/browse/JAMESAPP-8
Check the comments for details. To fix it you will have to modify
wrapper.conf to include conf/lib on the class path.
It has been discussed on the mailing list but can't seem to find it right now.

Cheers,

2012/7/8 Meir Rotstein <me...@rotstein.co.il>:
> Hello,
>
> I'm trying to add new simple custom mailet by
> following<http://james.apache.org/server/3/dev-extend-mailet.html>this
> guide instructions, also added to the mailetcontainer.conf the
> following line, as needed:
> <mailet match="All" class="mypackage.MyMailetClass"/>
>
> I packed the mailet project into a jar file and copied it to
> the \apache-james-3.0-beta4\conf\lib folder - this should be enough for
> adding my jar into the classpath as according to
> this<http://james.apache.org/server/3/config-mailetcontainer.html>the
> mailetcontainer.xml configuration is not needed.
>
> Bottom line - when I start the James server it fail to restart and I see a
> ClassNotFoundException for my mailet class in the mailetcontainer.log.
>
> What I'm missing here?
>
> Thanks,
> Meir.



-- 
Ioan Eugen Stan / CTO / http://axemblr.com