Home > SOA > Mule ESB set up with Maven under Eclipse (OSX)

Mule ESB set up with Maven under Eclipse (OSX)

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 java.net.InetAddress.getAddressFromNameService(InetAddress.java:1215)
at java.net.InetAddress.getLocalHost(InetAddress.java:1350)
at org.mule.config.DefaultMuleConfiguration.(DefaultMuleConfiguration.java:116)
at org.mule.context.DefaultMuleContextBuilder.getMuleConfiguration(DefaultMuleContextBuilder.java:125)
at org.mule.context.DefaultMuleContextBuilder.buildMuleContext(DefaultMuleContextBuilder.java:84)
at org.mule.context.DefaultMuleContextFactory.buildMuleContext(DefaultMuleContextFactory.java:197)
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:186)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:168)
at org.mule.MuleServer.initialize(MuleServer.java:351)
at org.mule.MuleServer.run(MuleServer.java:257)
at org.mule.MuleServer.start(MuleServer.java:244)
at org.mule.MuleServer.main(MuleServer.java:121)
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 http://mule.mulesource.org *
* *
* 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: , , ,
  1. January 22, 2010 at 3:33 pm

    Hi, it looks like a Mac-specific issue related to IPv4 vs IPv6 network config.

    On a side note, any reason why you’re not using Mule 2.2.1 or 3.0 snapshots?

    • ltalbot
      January 22, 2010 at 4:47 pm

      good point Andrew, I thought I had the latest stable version.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: