1) By mailet.log, I of course meant the mailet.<timestamp>.log file.
This is still empty.
2) The problem is that it fails before returning anything. As you can
see from the code, the log() call is made first before doing any
matching, so I should at least see that. I grepped all the logs in
/james-install/apps/james/logs and saw nothing.
3) Same result with class="Null", or anything else. The point is that
the spoolmanager.log file does not show any errors on instantiation at
all.
4) I am using OS X 10.4, but whether or not this is causing the
problem I have no idea due to the lack of debugging info.

This only fails with custom matchers, but the problem is that I have
no way of debugging them, as the DEBUG setting has absolutely no
effect whatsoever. I have tried other log levels such as FATALERROR
and ERROR, to no avail.

On 4/12/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
1) The log for matchers/mailets should be written in mailet-*.log files.
2) The "return null" will make the matcher to not match everything.
3) What is the "All" mailet you use in pair with HelloWorld matcher?
4) IIRC there is a known issue between dnsjava (a library used by James)
and some JVM for OSX, quoting a recent message from Mike Bryant:
----
James 2.3 uses DNSJava, and DNSJava has known issues with the JVM
that comes with OS X 10.3. Hopefully you will be using OS X 10.4 and
will be able to verify that the issue is solved by OS X 10.4.
----

Stefano

Dan Jacob ha scritto:
> I have a custom matcher, which basically just writes to log:
>
> package com.myapp.james.matchers;
>
> import org.apache.mailet.GenericMatcher;
> import org.apache.mailet.Mail;
>
> import javax.mail.MessagingException;
> import java.util.Collection;
>
> public class HelloWorld extends GenericMatcher {
>
>    public Collection match(Mail mail) throws MessagingException {
>         log("Hello, World");
>        return null;
>    }
>
> }
>
> This is registered in config.xml thus:
>
> <mailet match="HelloWorld" class="All" />
>
> Matcher compiles fine, and I have added the correct package to
> <matcherpackages>.
>
> I have also set the log level to DEBUG for all logs in environment.xml.
>
> Restarting the server, two things happen:
>
> 1. HelloWorld matcher does not write anything to the log;
> 2. spoolmanager.log stops writing entries at the point HelloWorld
> matcher is instantiated (just after the PostmasterAlias
> matcher/mailet):
>
> 12/04/07 08:01:25 INFO  spoolmanager: JamesSpoolManager init...
> 12/04/07 08:01:25 INFO  spoolmanager: Matcher All instantiated.
> 12/04/07 08:01:25 INFO  spoolmanager: Mailet PostmasterAlias instantiated.
> <END OF FILE>
>
> The mailet.log file is empty.
>
> Sending mails through James works fine, so it's up and running, but
> HelloWorld does not seem to work and I cannot find where it is logging
> to.
>
> Using Mac OS X, James 2.3.0, JDK 1.5.0_07.
>
> Thanks in advance !



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Dan Jacob

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to