the ping pong stuff is just testing the connections are okay. Put some debug in your message consumer and make sure something is making it through
I went through the log and did a search for "exception" then only one I came across was:
[20:49:04,280,JMSContainerInvoker] destination not found: queue/MailQueue reason: javax.naming.NameNotFoundException: MailQueue not bound
What can I do to remedy this? Or do I even need to?
I did as joelvogt suggested and put some System.out.println and log.debug statements into the code. I’m not sure where you mean when you say “message consumer” but I put statements in NewMailService, MailHandlerMDB, IMAPMsgManager, and MailAccountBean. Each of the statements I prefaced with “mah-“ and after rebuilding the xml files started the app. I did a search of the log for “mah” and came up with nothing. I looked in the command window and didn’t see any mah there either.
On another note in the logs I see:
[07:09:31,172,Engine] jsp: init
[07:09:42,879,Engine] MailAccountServlet: init
[07:09:43,099,MailAccountBean] ejbActivate, username=null
[07:09:43,149,MailAccountBean] ejbLoad, username=mhandwork
Shouldn’t there be a username in the ejbActivate? I looked in the code and saw that the null is hardcoded in. Is this correct?
Okay firstly the message consumer is most likely your mailHandlerMDB. This will take you jms messages.
But to get these to go, you will need to fix up the exception you have
>20:49:04,280,JMSContainerInvoker] destination not found: >queue/MailQueue reason: >javax.naming.NameNotFoundException: MailQueue not bound
You will need to add this as a queue in the mq section of jboss.jcml. There will be other queues there, just copy paste and change the name to MailQueue. NB you do not need the queue/ part on the front in your config.
Once this is done, fingers crossed your app will publish messages to your queue and away you go.
I did a search for jboss.jcml and found three files. I added the following code to each (not knowing which it was using):
<!-- Configure the mailer MailQueue -->
The one in /chap11 already had this, the ones in /catalina and /default did not. Now when I start the app I get the following exception:
I feel like I need to tell you that I have only been working with this app for a couple days and I'm not that familiar with it. I'm having trouble troubleshooting myself.
I didnt include this error because it came right on the heels of the first, but just in case it is a symptom of something else here goes:
[13:27:22,031,ConfigurationService] Unexpected error
I'm looking in the jboss.jcml file and at the end there is a line that reads:
> <!-- Configure our custom NewMailService MBean -->
does that need to be configured somehow?
I think I've been barking up the wrong tree. I've been using the run_with_catalina.bat and I dont think that utilizes the configs setup for chap11. Now I run the run_mailer.bat and get all kinds of exceptions.
-shakes head sadly-
not looking good.
I'll continue this thread in a new one