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 "Jesper B. Kiær" <jb...@jezzper.dk> on 2009/12/16 10:43:55 UTC
solved .... Need help with Mailets, getting a java.lang.NoClassDefFoundError: org/apache/mailet/base/GenericMailet
error
I have found the reason why in an earlier posting from Stefano Bagnara
"You can place your jar in the apps/james/SAR-INF/lib folder, but you
don't have to build your mailets against mailet_1_0.jar, but instead use
the mailet.jar you find in the james 2.3.1 sar."
I was using the mailet _base i think instead
I tried it and It works now :-)
From: "Jesper B. Kiær" <jb...@jezzper.dk>
To: "James Users List" <se...@james.apache.org>
Date: 15-12-2009 13:48
Subject: Need help with Mailets, getting a
java.lang.NoClassDefFoundError: org/apache/mailet/base/GenericMailet error
Hi
I have been trying to code my first mailet.
I have my test mailet "MyMailet" which extends GenericMailet from the the
Mailet Base lib.
I compiles fine.
I then deploy it by
- extracting the james.sars file
- adding the my mailet jar to the SAR-INT\lib directory
- zipping it again
.-replacing the james.sar file in APPS directory
- add my package to the config.xml file in the apps\James\SAR-INF\
directory
<mailetpackage>com.jezzper.mailets</mailetpackage>
- add <mailet match="All" class="MyMailet"</mailet> in the transport
section
- restart James
If I check the Phoenix log file it says:
ERROR 2009-12-15 13:46:07.015 [Phoenix.] (): Component named
"spoolmanager" failed to pass through the Starting stage. (Reason:
java.lang.NoClassDefFoundError: org/apache/mailet/base/GenericMailet).
ERROR 2009-12-15 13:46:07.015 [Phoenix.] (): There was an error running
phase "startup" for Block named "spoolmanager". (Reason: Component named
"spoolmanager" failed to pass through the Starting stage. (Reason:
java.lang.NoClassDefFoundError: org/apache/mailet/base/GenericMailet).).
Anyone has an idea what I am doing wrong
brgds jesper Kiær