Quick Start Guide

This document will walk you through the steps to get a ServiceMix 4.0 milestone build up and running.

Initial Preparation

ServiceMix 4 requires JDK 1.5 or later. For optimal results, confirm that your JDK version matches JDK listed at http://java.sun.com/javase/downloads:

Brians-Desktop:apache-servicemix-4.0-m1 topping$ java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)

Download

The download page contains information about the latest packages for ServiceMix 4. For purposes of this document, we will assume that you are using one of the following packages:

Linux/Mac OS X/Unix Downloads

Windows downloads

If you wish to use the source code as supplementary documentation, be sure to download the "-sources" file as well.

Unpack

Using the appropriate archive expander, create the directory tree on your hard drive. If you chose to download the sources, unpack them second after the binary distribution without changing directories. The sources are an overlay and fill in the empty "src" directory in the binary distribution archive.

Windows
cd <installation_parent>
unzip apache-servicemix-4.0-m1.zip
unzip apache-servicemix4.0-m1-src.zip
Linux, OS-X other UNIX
cd <installation_parent>
tar xvfz apache-servicemix-4.0-m1.tar.gz
tar xvfz apache-servicemix4.0-m1-src.tar.gz

Enable Debugging (optional)

Debug output is sent to <installation_dir>/data/log/servicemix.log. The default logging level is set at INFO, but you may desire to see more. You can change this at <installation_dir>/etc/system.properties:

org.ops4j.pax.logging.DefaultServiceLog.level=DEBUG

Run

From within the directory you created when unpacking, start the ServiceMix container:

Brians-Desktop:apache-servicemix-4.0-m1 topping$ bin/servicemix 

If all goes well, you will be greeted with the ServiceMix banner and a prompt for the GShell plugin:

Where To Go From Here

  • ServiceMix 4 is based on the Apache Felix OSGi container.
  • The Eclipse IDE embeds an OSGi container called Equinox for it's plugin environment. The Eclipse Plugin Development Environment is easily adaptable to provide a stable and robust platform for development and debugging of many types of OSGi components besides just Eclipse plugins.
  • IntelliJ IDEA is rumored to include OSGi support in 8.0, but it is not listed on the roadmap yet. In the mean time, Osmorc implements a facet for OSGi projects.
  • Apache Maven is the easiest tool to use for development of SMX4 components due to plugins such as the Bundle Plugin.
  • Because OSGi bundles are a superset of a standard JAR, it is common for newer service component JARs in the Maven repository to include bundle metadata.

Common Problems

Here are a selection of common problems:

ulimit: open files: cannot modify limit: Invalid argument

This is a problem with the startup script that shows itself on OS-X for the Milestone 1 build. You can safely ignore this, and it is fixed in the current Subversion trunk.

  • No labels

1 Comment

  1. WHOOOPS!

    This document looks a lot like http://servicemix.apache.org/SMX4KNL/1-quick-start.html. I guess I remembered that document as targeted toward SMX3, and couldn't find it when I looked for it again. The dead link I created this from must have been cut when the SMX4KNL space was created.

    I'll get the useful additions added to Gulliaume's document tomorrow, but for now, will simply rewire the dead link to point to the correct place.