You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Marc Chamberlin <ma...@easystreet.com> on 2002/07/30 00:05:30 UTC

Mailets and MySQL problem

Hello -

I am running version 2.0a3 of Jams on a Win98 box and am using MySQL for my mail repository. I have a mailet that I wrote to help me
better manage a mail list that I am having troubles to get working. This mailet is designed to handle an incoming request from a
user to subscribe to the mail list in such a fashion as to both forward the incoming request on to the list server manager, by
sending an email to the list server manager's URL to subscribe the new user to the mail list, and then to post a customized
announcement email to the mail list itself informing everyone on the list of the new subscriber.

So, in effect I have written the mailet so it will respond by sending out two separate emails. I have designed the mailet class such
that each of the two emails is handled by a separate method in the mailet class, and what is interesting is that if I run the mailet
with either one of these emailing methods commented out, the mailet works just fine and fulfills that part of the functionality. But
if I try to run both methods, then I get the following exception and stack walkback. What I suspect is, is that James is hitting the
MySQL database too fast when both methods are ran, and a conflict is occurring trying to make the connections to the database. Each
of the mailing methods have been design like the James examples for mailets. Nothing out of the ordinary is showing up in any of the
log files.

public void service(org.apache.mailet.Mail mail) throws javax.mail.MessagingException {
if (debug)
System.out.println("ListAcceptMailet service method reached.");
subscribeToListManager(mail);
notifyMailList(mail);
//Stops further James processing on the Mail message.
mail.setState(Mail.GHOST);
}


Wonder if anyone has any ideas?  I can send anyone the complete source code for my mailet if you send me an email... I don't know if
this group's mail list server will allow attachments....

Thanks for any help offered!   Marc Chamberlin


Phoenix 4.0a4

Application file:/F:/james/jakarta-james-2.0a3/apps/james.sar uses a deprecated
packaging format.
James 2.0a3-cvs
Started POP3 Server plain:110
Started SMTP Server plain:25
Started NNTP Server plain:119
ListAcceptMailet service method reached.
java.lang.RuntimeException: Did not find a record Mail1027976013500-0-!168872769
4 in spool
        at org.apache.james.mailrepository.JDBCMailRepository.retrieve(JDBCMailR
epository.java:454)
        at org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.ja
va:205)
        at org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
ecutableRunnable.java:47)
        at org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
.java:86)
java.lang.RuntimeException: Exception while retrieving mail: Did not find a reco
rd Mail1027976013500-0-!1688727694 in spool
        at org.apache.james.mailrepository.JDBCMailRepository.retrieve(JDBCMailR
epository.java:494)
        at org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.ja
va:205)
        at org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
ecutableRunnable.java:47)
        at org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
.java:86)


----------------------------------------------------------------------------------------------------------------
Do you think the software industry will ever make software that is as easy and reliable for a user to use
as the automobile industry makes a car easy and reliable for a user to drive?
----------------------------------------------------------------------------------------------------------------
A man said unto the universe -  "Sir, I exist!"
"However," replied the universe  "I do not see where that creates in me a sense of an obligation."
          - Stephen Crane



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Mailets and MySQL problem

Posted by "Noel J. Bergman" <no...@devtech.com>.
Yes, you can post attachments to the list.

That error looks like one we've been discussing on the developer mailing
list.  So far no one has found the problem, but in most cases it appears to
be ignorable.

:-(  We've really got to track that annoying thing down ...

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>