Posts Tagged ‘ESB’

Mule ESB set up with Maven under Eclipse (OSX)

January 22, 2010 2 comments

I have followed the Mule ESB tutorial and found that it did not work with Java5 on OSX. I have switched to Java6 and everything was back to normal.

Everything is explained very well on Mule web site, here is what I did to get it running with Maven 2 under Eclipse on OSX.

Firstly I have of course downloaded Mule (community edition) on their download page and expanded everything in /opt folder with the following command:

tar -xvzf mule-standalone-2.2.1.tar.gz

I’ve also downloaded the mule ide plugin for eclipse and followed the instructions here

To get it running with Maven, I used the command line in my project folder :
mvn mule-project-archetype:create -DartifactId=MMuleProject -DmuleVersion=2.2.0

and then I have the following command:
mvn eclipse:eclipse

to make it available as a project in eclipse.

Then I have launched Eclipse and imported the project:

File->import->Existing project into workspace

and I have selected the MMuleProject folder as root folder. Once the project was imported i have right-clicked on the project name MMProject in the package explorer and added Mule libraries:

project properties under eclipse

the project finally appears like the following inside the package explorer:

With Java 5 enabled I had this issue when trying to run the project : (right-click on mule-config.xml -> run as -> Mule Server)

INFO 2010-01-22 14:15:41,561 [main] org.mule.MuleServer: Mule Server initializing...
ERROR 2010-01-22 14:15:41,648 [main] org.mule.MuleServer: A Fatal error has occurred while the server was running: [[B
java.lang.ClassCastException: [[B
at org.mule.config.DefaultMuleConfiguration.(
at org.mule.context.DefaultMuleContextBuilder.getMuleConfiguration(
at org.mule.context.DefaultMuleContextBuilder.buildMuleContext(
at org.mule.context.DefaultMuleContextFactory.buildMuleContext(
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(
at org.mule.context.DefaultMuleContextFactory.createMuleContext(
at org.mule.MuleServer.initialize(
at org.mule.MuleServer.start(
at org.mule.MuleServer.main(
ERROR 2010-01-22 14:15:41,671 [main] org.mule.MuleServer:

Switching to JDK 6 solved it :

INFO 2010-01-22 14:18:18,142 [main] org.mule.DefaultMuleContext:
* Mule ESB and Integration Platform *
* Version: 2.2.0 Build: 14110 *
* MuleSource, Inc. *
* For more information go to *
* *
* Server started: 1/22/10 2:18 PM *
* Server ID: 999d182b-0758-11df-82a2-811cd9e5dabf *
* JDK: 1.6.0_15 (mixed mode) *
* OS encoding: UTF-8, Mule encoding: UTF-8 *
* OS: Mac OS X (10.5.8, x86_64) *
* Host: loic-talbots-macbook-pro.local ( *
* *
* Agents Running: None *

pheeewww… it should have taken a few minutes, it took a few hours to figure out I should not use JDK5. Now I’ll experience this lightweight SOA architecture to expose SOAP web services. Something for a next post.

Categories: SOA Tags: , , ,