james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Klems (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-1528) Deploying a custom Mailet results in ClassNotFound exception
Date Wed, 06 Nov 2013 10:32:17 GMT

    [ https://issues.apache.org/jira/browse/JAMES-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814775#comment-13814775

Markus Klems commented on JAMES-1528:

OK, found the problem. In bin/setenv.sh it is expected that you start James from within the
bin directory.

> Deploying a custom Mailet results in ClassNotFound exception
> ------------------------------------------------------------
>                 Key: JAMES-1528
>                 URL: https://issues.apache.org/jira/browse/JAMES-1528
>             Project: James Server
>          Issue Type: Bug
>          Components: Matchers/Mailets (bundled)
>    Affects Versions: 3.0-beta4
>         Environment: Ubuntu 13.04, 64 bit on EC2 micro instance
>            Reporter: Markus Klems
> Hi,
> I created a custom Mailet and created a jar file from it. I copied the custom-mailet.jar
into $JAMES_HOME/conf/lib folder as suggested by $JAMES_HOME/bin/setenv.sh. Then I copied
$JAMES_HOME/conf/mailetcontainer-template.conf to $JAMES_HOME/conf/mailetcontainer.conf and
added the following line below <processor state="transport" enableJmx="true">
> <mailet match="All" class="com.company.CustomMailet"/> which is the full classpath
of the Mailet that I added with custom-mailet.jar
> However, when I want to (re-)start James, the server crashes with the following exception:
> Caused by: java.lang.ClassNotFoundException: com.company.CustomMailet
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> 	at org.apache.james.container.spring.bean.factory.mailetcontainer.AbstractLoaderBeanFactory.load(AbstractLoaderBeanFactory.java:44)
> 	at org.apache.james.container.spring.bean.factory.mailetcontainer.MailetLoaderBeanFactory.getMailet(MailetLoaderBeanFactory.java:45)
> 	... 29 more
> To my understanding, James does not find the class that I added with $JAMES_HOME/conf/lib/custom-mailet.jar.
Is this a bug or am I doing something wrong?
> Thanks!

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message