Running Mule 2.2.x with 64-bit Tanuki Wrapper and Java 6 on Mac OS X

If you tried to run (or are running) Mule 2.2.x on an Intel based Mac using Java 6 and are tired of seeing the following error message, then read on!

WARNING - Unable to load the Wrapper's native library because none of the
 following files:
 libwrapper-macosx-x86-64.jnilib
 libwrapper-macosx-universal-64.jnilib
 libwrapper.jnilib
 could be located on the following java.library.path:

MULE_HOME/bin/%LD_LIBRARY_PATH%
 MULE_HOME/lib/boot
 Please see the documentation for the wrapper.java.library.path

This issue has been raised a few times and there was a suggestion on how to handle it here. NOTE: the suggestion (although reasonable) does not work – the Tanuki Wrapper is smart enough to know you are trying to fool it.

NOTE:  I only updated the “macosx” wrapper files within the mule hierarchy, so what I suggest here will not directly work for other OSes.  The concepts presented here could be applied, and may work, but I have not tried this for any other OS like Windows or Linux.

WARNING: All suggestions here are to be done at your own risk. You can mess things up on your Mac if you attempt any of these steps.  Make backups, use your brain, be careful.  Consider yourself warned 🙂

Steps to update the Tanuki Wrapper embedded within Mule

  1. Download the latest Tanuki Wrapper software from and unpack it somewhere
    1. I grabbed the full “Delta Pack” (tar.gz) version 3.3.5, which was the latest at the time
    2. From here on I refer to TANUKI_WRAPPER_HOME as the root of the folder where you unpacked the archive
  2. Make a backup copy of mule’s boot directory (to work around Murphy’s Law)
    1. Assume MULE_HOME is set to the root of your Mule 2.2.x install (e.g. /opt/mule-standalone-2.2.1)
    2. I made a complete copy and called it boot.orig by doing the following
    3. cd $MULE_HOME/lib; cp -p boot boot.orig
  3. Copy the new wrapper executables
    1. cp $TANUKI_WRAPPER_HOME/wrapper-delta-pack-3.3.5/bin/wrapper-macosx-universal-* $MULE_HOME/lib/boot/exec
    2. NOTE: this will replace the 32-bit one that was installed already and adds the 64-bit version
  4. Remove the old and copy the new wrapper libraries
    1. rm $MULE_HOME/lib/boot/libwrapper-macosx-*
    2. cp $TANUKI_WRAPPER_HOME/wrapper-delta-pack-3.3.5/lib/libwrapper-macosx-universal-* $MULE_HOME/lib/boot
    3. NOTE: I decided to remove the existing macosx libraries first, because there was a ppc version that I won’t use and didn’t want a mix of old/new libraries
  5. Copy the new wrapper.jar (adding the version number) and remove the old jar
    1. cp $TANUKI_WRAPPER_HOME/wrapper-delta-pack-3.3.5/lib/wrapper.jar $MULE_HOME/lib/boot/wrapper-3.3.5.jar
    2. rm $MULE_HOME/lib/boot/wrapper-3.2.3.jar

You should be good to go at this point, so give your mule a kick and see what happens!  If all went well, you should see something similar to the following:

Java Service Wrapper Community Edition 32-bit 3.3.5
Copyright (C) 1999-2009 Tanuki Software, Ltd.  All Rights Reserved.
http://wrapper.tanukisoftware.org

Launching a JVM...
Starting the Mule Server...
...

Please submit your comments to help improve this blog.  I’ll do my best to update this for clarity and completeness in a timely manner.

Happy Trails!
Rich Remington

This entry was posted in Development and tagged , , , , . Bookmark the permalink.

4 Responses to Running Mule 2.2.x with 64-bit Tanuki Wrapper and Java 6 on Mac OS X

  1. Andrew Lenards says:

    Thanks for posting this.

    For those that don’t catch it immediate, the “Delta Pack” community edition is being downloaded. I wasn’t paying full attention when I looked at that step, but read on and caught it in the sample output. My bad – but if anyone else doesn’t catch it right away… there you go.

  2. Thanks! Helped me out with this gotcha. One note though, I think you meant “$MULE_HOME/lib/boot” instead of “$MULE_HOME/boot” but if anyone’s reading this they should be able to figure it out anyway.

  3. Rich Remington says:

    Thanks for the feedback! I’ve finally gotten around to updating the instructions.

    And, I’ll be updating these instructions shortly for Mule ESB 3.1 as well. It appears the issue is not resolved due to licensing restrictions with newer versions of the wrapper.

  4. Kazunori Imamura says:

    Thanks a lot!!! It worked like a charm (Y)

Leave a Reply

Your email address will not be published. Required fields are marked *