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 Hong Jin <ho...@mjr.com> on 2002/06/05 15:50:19 UTC

Can not add my own mailet

Hi,
I am new for James, just installed James(James 2.0a3) in my computer, made 
it to send and receive mail successfully. After I created a mailet(for my 
first email-based application),  jar file, changed config.xml, copied jar 
file to lib, and restarted James, at run time I got error message like this:
Application file:/E:/James/apps/james.sar uses a deprecated packaging format.

from phoenix.log file the error message said:
1023282687834 [ERROR  ] (Phoenix.kernel.james.lifecycle): Block named 
"spoolmanager" failed to pass through the Initialization stage. (Reason: 
java.lang.NoClassDefFoundError: org/apache/mailet/GenericMailet).

It looks like James can not find class GenericMailet.

Could some one tell me what I did wrong, or something I missed, and how to 
fix this problem? If it was james.sar problem, where I can get a newer 
james.sar file, or where I can find more help? Thanks.

Hong Jin

OS: Win2000
Java: jdk1.3
James: 2.0a3
Create Jar: C:/jdk1.3/bin/jar cf mjrmailet.jar 
mjr\mailapps\popforward\mailet\*.class

config.xml:
<mailetpackages>
    <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
    <mailetpackage>mjr.mailapps.popforward.mailet</mailetpackage>
</mailetpackages>

<processor name="root">
    <!-- test my mailet -->
    <mailet match="RecipientIs=test1@testjames.com" class="TestMailet">
    </mailet >
</processor>

Mailet:
package mjr.mailapps.popforward.mailet;

import javax.mail.*;
import org.apache.mailet.*;
public class TestMailet extends GenericMailet{
    public void service(Mail mail) throws MessagingException{
       System.out.println("TestMailet.service(): this is a test string");
    }
}

Error message in phoenix.log
1023282687834 [ERROR  ] (Phoenix.kernel.james.lifecycle): Block named 
"spoolmanager" failed to pass through the Initialization stage. (Reason: 
java.lang.NoClassDefFoundError: org/apache/mailet/GenericMailet).
1023282687834 [ERROR  ] (Phoenix.kernel.james): There was an error running 
phase "startup" for Block named "spoolmanager". (Reason: Block named 
"spoolmanager" failed to pass through the Initialization stage. (Reason: 
java.lang.NoClassDefFoundError: org/apache/mailet/GenericMailet).).


Error message at run time:

E:\James\bin>run

Phoenix 4.0a4

Application file:/E:/James/apps/james.sar uses a deprecated packaging format.
James 2.0a3-cvs
There was an uncaught exception:
---------------------------------------------------------
--- Message ---
Failed to initialize application james.
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: Failed to 
initialize application james.
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:183)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:467)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:461)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:449)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:439
)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:182)
at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:115)
at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:101)
at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:67)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:88)
at org.apache.avalon.phoenix.launcher.Main.main(Main.java:51)
---------------------------------------------------------
The log file may contain further details of error.
Please check the configuration files and restart Phoenix.
If the problem persists, contact the Avalon project. See
http://jakarta.apache.org/avalon for more information.
Shutting down Phoenix.
E:\James\bin>

external POP3

Posted by Sjoerd Van Nooten <ch...@pandora.be>.
Hello



I have a pop3 account from my isp and I want to download it trough james is
this possible



Best regards



Sjoerd Van Nooten

choc_vn@pandora.be



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


RE: Can not add my own mailet

Posted by Danny Angus <da...@thought.co.uk>.
<mailetpackage>mjr.mailapps.popforward.mailet</mailetpackage>
revert that line to what it was originally , and change this:
<mailet match="RecipientIs=test1@testjames.com" class="TestMailet"/>
to be a FQCN instead

d.

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