Hi, I am trying to deploy a custom mailet and a custom matcher on my running James server.
When adding my mailet or my matcher in the mailetcontainer.xml file, I have a strange error ( repeted thousand of times ). I added the stacktrace as an attachement for readability. Here is how my code looks like : package com.linagora.openpaas.mailet; public class PostMailOnESN extends GenericMailet { public void init() throws MessagingException { // ... } public void service(Mail mail) throws MessagingException { // ... } public void destroy() { // ... } } I added the generated jar in conf/lib directory. Here is the section of mailetcontainer.xml file involving this mailet : <mailet match="com.linagora.openpaas.matcher.ESNPostmasterMailMatcher=http://127.0.0.1:8080/api/messages/email/check%esn.james.minet.net" class="com.linagora.openpaas.mailet.PostMailOnESN"> <esnip>127.0.0.1</esnip> <port>8080</port> <api>api/james/mail</api> </mailet> Note that it works fine if I replace this mailet by : <mailet match="All" class="Null"/> And That I get the same kind of stacktraces using the following non existing mailet and matcher : <mailet match="Al" class="Null"/> Or : <mailet match="All" class="Nul"/> Oh and I am running james 3.0.0-beta5, on openjdk-7-jre ( I have the same problem using openjdk-6-jre ) My question is : - have I made something wrong ? ( I have the impression - have someone deployed a custom mailet successfully on James 3.0.0-beta5 ? Does you have any tips ? Thank you by advance, Benoit
INFO | jvm 1 | 2015/01/09 13:47:21 | ERROR 13:47:20,988 | james.mailetcontext | Exception caught in RemoteDelivery.run() INFO | jvm 1 | 2015/01/09 13:47:21 | org.apache.james.queue.api.MailQueue$MailQueueException: Unable to dequeue next message (javax.jms.IllegalStateException: The Session is closed) INFO | jvm 1 | 2015/01/09 13:47:21 | at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171) INFO | jvm 1 | 2015/01/09 13:47:21 | at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:779) INFO | jvm 1 | 2015/01/09 13:47:21 | at java.lang.Thread.run(Thread.java:745) INFO | jvm 1 | 2015/01/09 13:47:21 | Caused by: javax.jms.IllegalStateException: The Session is closed INFO | jvm 1 | 2015/01/09 13:47:21 | at org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731) INFO | jvm 1 | 2015/01/09 13:47:21 | at org.apache.activemq.ActiveMQSession.commit(ActiveMQSession.java:554) INFO | jvm 1 | 2015/01/09 13:47:21 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2015/01/09 13:47:21 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) INFO | jvm 1 | 2015/01/09 13:47:21 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2015/01/09 13:47:21 | at java.lang.reflect.Method.invoke(Method.java:606) INFO | jvm 1 | 2015/01/09 13:47:21 | at org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:348) INFO | jvm 1 | 2015/01/09 13:47:21 | at com.sun.proxy.$Proxy71.commit(Unknown Source) INFO | jvm 1 | 2015/01/09 13:47:21 | at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:116) INFO | jvm 1 | 2015/01/09 13:47:21 | ... 2 more
--------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org