Hi again,

Thanks for answers. It is resolved, as Jerry said James was unable to see the configuration file as it had a wrong name( just an extra letter ). Correcting the name solved the problem.

Ozgur Eroglu

On 03/13/2014 04:41 PM, Jerry M wrote:
Hi Ozgur,

You definitely may have a classpath problem with your jar. But if a mailet is defined that it can't find, that would show up much more blatantly than just not having a log entry. Startup should fail if it can't find a defined mailet class.

Is this your first change to the processor/mailet configuration? If so, it could be that it's not even seeing your renamed/modified mailetcontainer.xml file. If James doesn't find that file in your conf directory, it'll fall back to a predefined one buried in one of the James jar files.

In situations like this, I like to see if I can force errors to determine what's happening.

1) Add a horrible XML syntax error to the mailetcontainer.xml (e.g. remove a "<" from an XML tag, or just add "adslfjadsfladskfj" outside a tag. Start James with that, and you should see very quickly if it's reading your custom mailetcontainer.xml file.

2) If it crashed due to your inserted XML syntax errors, re-fix those XML errors. If it started ok, then the problem is it's not using your custom mailetcontainer.xml file.

3) If it's indeed using your custom mailetcontainer.xml, try defining a mailet that you are certain has no class defined: ...... class="adsjflasjdflskdfjalfadsf". It should definitely not start.

4) Another thing to try is to remove your jar from conf/lib completely. If it fails without the jar, and works with the jar there, then James is indeed finding and loading your mailet. At that point, I would add my own log(....) statements to the init and service methods in the mailet.

Jerry

On 3/13/2014 7:54 AM, Kurt Harders wrote:
Hi,

although the conf/lib directory is part of the classpath the jar files contained in that directory are not. You must add a line in conf/wrapper.conf to add your jar to the classpath:

wrapper.java.classpath.120=/opt/apache-james-3.0-beta4/conf/lib/your-empty-mailet.jar

Regards, Kurt

Am 13.03.2014 10:38, schrieb Özgür EROĞLU:
Hi,

I am using James 3 beta.4 and trying to create a custom mailet which does nothing (nothing in service method). After creating a jar I copied it to jamesPath/conf/lib. Also added mailet definition into the root processor before any toProcessor calls. Now, when I restart james, should not I see an INFO log from james.mailprocessor which is indicating that this custom mailet has been initialized? If not, how can I understand that my mailet has been initialized?

Thanks,
Ozgur Eroglu

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to