Noel J. Bergman wrote:My bad yet again. Ouch. Was not picking up the new config.xml when deploying my modified james.sar, and the default path of "file:///../var/mail/guidspool" was unresolveable.
Was headed down the RemoteDelivery Plan B path, but I am getting these in the logs and my custom spool is not getting created.We would like to be able to delay processing of a certain set of inbound
messages.
B. Write a matcher for the set of messages we want to delay, route them
to a custom processor. In that processor have a custom Mailet which
writes to a custom Spool repository and runs a number of threads which
then pluck from that repository using an accept(delay) call.
You want to use Plan B, and you want to base it off of the current
branch_2_1_fcs code, in which we made some changes related to the spool
interface. Write a custom mailet based upon RemoteDelivery that holds
messages in its queue until ready to deliver, then posts them back to the
pipeline.
--- Noel
Would going to branch_2_1_fcs fix this? Or am I just missing something in the config or setup? Code snippet for creation is below as well.
String spoolPath = getInitParameter("spool"); if (spoolPath == null) { spoolPath = "file:///../var/mail/guidspool"; }
ComponentManager compMgr = (ComponentManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
try {
// Instantiate a MailRepository for spooled mails
MailStore mailstore = (MailStore) compMgr.lookup("org.apache.james.services.MailStore");
DefaultConfiguration spoolConf
= new DefaultConfiguration("repository", "generated:MsgGuidMailet.java");
spoolConf.setAttribute("destinationURL", spoolPath);
spoolConf.setAttribute("type", "SPOOL");
this.spool = (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());
}
21/01/04 15:56:34 ERROR mailstore: Failed to retrieve Store component:Cannot find or init repository: null
org.apache.avalon.framework.component.ComponentException: Cannot find or init repository: null
at org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager.select(RepositoryManager.java:205)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:92)
at $Proxy1.select(Unknown Source)
at org.apache.james.mailrepository.AvalonMailRepository.initialize(AvalonMailRepository.java:165)
at org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:92)
at $Proxy3.select(Unknown Source) at COM.soundbite.mail.MsgGuidMailet.init(MsgGuidMailet.java:84) at org.apache.mailet.GenericMailet.init(GenericMailet.java:174)
21/01/04 15:56:34 INFO objectstorage.repository: org.apache.james.mailrepository.filepair.File_Persistent_Stream_Repository opened in /var/spool/mail/guidspool21/01/04 15:56:34 WARN objectstorage: Cannot find or init repository: null
java.lang.NullPointerException
at org.apache.james.mailrepository.filepair.AbstractFileRepository.initialize(AbstractFileRepository.java:168)
at org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager.select(RepositoryManager.java:191)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:92)
at $Proxy1.select(Unknown Source)
at org.apache.james.mailrepository.AvalonMailRepository.initialize(AvalonMailRepository.java:165)
at org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:350
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Thanks again!
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
