Hi all,

This morning I've downloaded the 2.2.0RC1 binary distibution from the
website. I've installed this on my machine that is running:

- Win2K SP4
- JDK 1.4.2

I've started the default configuration and that comes up just fine. The next
step was to disable the POP3 and NNTP services and  replace the spoolmanager
section with a configuration I copied over from an old test environment that
has been running James 2.0a3 for ages. I also copied jars containing custom
matchers and mailets to james/SAR-INF/lib. One of the custom mailets is
giving me problems. When starting James with run.bat I see the following:

James 2.2.0RC1
java.lang.NoSuchMethodError:
org.apache.james.services.SpoolRepository.accept()Ljava/lang/String;
        at
nl.contrado.massmailer.mailets.RemoteDelivery.run(RemoteDelivery.java:200)
        at java.lang.Thread.run(Thread.java:534)
Remote Manager Service started plain:4555
POP3 Service Disabled
SMTP Service started plain:25
NNTP Service Disabled
Fetch POP Disabled
FetchMail Disabled

The RemoteDelivery mailet is a slightly modified version of the
RemoteDelivery mailet that was part of James 2.0a3. What really puzzles me
is that the indicated method (String accept()) is present in James 2.2.0RC1.
I've checked this by downloading the src distribution.

Relevant code snippets from my mailet:

[initialisation]
ComponentManager compMgr =
(ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT
_MANAGER);
String outgoingPath = getInitParameter("outgoing");
if (outgoingPath == null) {
  outgoingPath = "file:///../var/mail/outgoing";
}
try {
  MailStore mailstore = (MailStore)
compMgr.lookup("org.apache.james.services.MailStore");
  DefaultConfiguration spoolConf = new DefaultConfiguration("repository",
"generated:RemoteDelivery.java");
  spoolConf.setAttribute("destinationURL", outgoingPath);
  spoolConf.setAttribute("type", "SPOOL");
  outgoing = (SpoolRepository) mailstore.select(spoolConf);
} catch (ComponentException cnfe) {
  log("Failed to retrieve Store component:" + cnfe.getMessage());
} catch (Exception e) {
  log("Failed to retrieve Store component:" + e.getMessage());
}

and
[processing mail from the spool]
while (!Thread.currentThread().interrupted() && !destroyed) {
  try {
    String key = outgoing.accept(delayTime);                        // <=
line 200 as mentioned in the stacktrace
    try {
      log(Thread.currentThread().getName() + " will process mail " + key);
      MailImpl mail = outgoing.retrieve(key);
      if (deliver(mail, session)) {
        outgoing.remove(key);
      } else {
        outgoing.store(mail);
      }
      mail = null;
    } catch (Exception e) {
      outgoing.remove(key);
      throw e;
    }
  } catch (Exception e) {
    log("Exception caught in RemoteDelivery.run(): " + e);
  }
}

Apparantly the mailet has no problems getting the SpoolRepository. Any
pointers are much appreciated.

--
Jeroen

 

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

Reply via email to