The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Don Stadler (74) [Avatar] Offline
On page 137 of the book instructions are given on how to run the mule cheapest price calculator. I ran into several problems and could not make it work.

1) The taget start-activeMQ does not exist in the ch4-examples.xml. I started activeMQ by cd'ing into the toolsapache-activeMQin directory and running activeMQ.bat directly.

2) I ran the target messageflow-spring in another console, and it started without complaint.

3) I started the client and attempted to send a message. No message was recieved in the out box whether the out queue was started or not. Repeated attempts all failed and there was no evidence that anything happened on the other consoles.

4) I also tried to run the JUnit test. It failed on an asertion error on the line: assertNotNull(quoteObject);

I don't think the message queues started up correctly, but the book gives no further guidance on how to start them correctly.

changed item 2) to read that I started messageflow-spring insead of messageflow-mule. Had I started both tagets I wouldn't have had the problem.
Don Stadler
Don Stadler (74) [Avatar] Offline
Re: Problems running Chapter 4 Mule messageflow example
OK, worked it out.

The activeMQ target is missing from ch4-examples.xml, but I also needed to run
ant -f ch4-examples messageflow-mule in yet another console window. When I did that the Spring test client worked.

Message was edited by:
Don Stadler
tijs.rademakers (494) [Avatar] Offline
Re: Problems running Chapter 4 Mule messageflow example
Don, could you check if you have a target named ext:start-activeMQ? Because the ch4-examples includes every target from the osesb-general.xml build file it should always include a startup target for every tool we use in the book. So you can always start ActiveMQ with the ext:start-activeMQ target from every examples build file.

Best regards,

Don Stadler (74) [Avatar] Offline
Re: Problems running Chapter 4 Mule messageflow example
Tjis, I ran the following:

ant -f ch4-examples.xml ext:start-activeMQ
Buildfile: ch4-examples.xml

[java] ACTIVEMQ_HOME: C:osesbinaction2 oolsapache-activemq-4.1.2
[java] ACTIVEMQ_BASE: C:osesbinaction2 oolsapache-activemq-4.1.2
[java] Loading message broker from: xbean:activemq.xml

So it worked. The book says to calls the target 'start-activeMQ'. I edited the ch4-examples.xml file and searched for anything 'active' & found nothing.

I just looked at the buildfile again and saw that ant is importing several xml files from the script directory. The ext:start-activeMQ target comes from osesb-general.xml.

The general tip I will take from this is that if I find a missing ant target anywhere I should look in the imported scripts as well as in the local build file, and look for variant names for the target.

I suggest you put up an errata page or attach a build notes page to the top of the forum with these kinds of things. This might keep you from going crazy answering questions as more people work their way through the examples.
Don Stadler (74) [Avatar] Offline
Re: Problems running Chapter 4 Mule messageflow example
I am finding this forum incredibly useful, BTW. At the cost of exposing my occasional idiocy to the world I'm finding posts where other developers have encountered similar problem(s) and have fixed. Tjis is being amazingly responsive, thanks much.

And sometimes when I go back and reread something I wrote last night at 2 in the morning London time a particular idiocy of mine fairly leaps out at me, as it did just now.... smilie

The result has been that I'm making very good progress through the book. I don't want to overstate the importance of the forum versus the book, but the forum is what makes swifter progress through the book possible.
tijs.rademakers (494) [Avatar] Offline
Re: Problems running Chapter 4 Mule messageflow example
Great! Hope I can keep up with you smilie