You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Markus Klems (JIRA)" <se...@james.apache.org> on 2013/11/06 11:32:17 UTC
[jira] [Resolved] (JAMES-1528) Deploying a custom Mailet results in
ClassNotFound exception
[ https://issues.apache.org/jira/browse/JAMES-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Markus Klems resolved JAMES-1528.
---------------------------------
Resolution: Fixed
> 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
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org