3. Installation
This document describes how to install and configure ServiceMix 3.x for both Unix and Windows' platforms.
Here you will find information about what are pre requisite software, where to download Geronimo from and how to customize the installation to use custom ports other than the defaults.
Troubleshooting
Path name
In case you get a
you may have some illegal characters in the path, e.g. !, % etc.
Missing libraries
Starting ServiceMix with old examples, CIMERO-generated xml configuration files or custom code may cause errors due to missing libraries. Usually, the missing class is displayed at the very end of the output. Here, some examples are shown and explained.
Caused by: java.lang.NoClassDefFoundError: org/quartz/JobExecutionException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:160)
at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:95)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:452)
... 53 more
Obviously (bold typed text), a class inside the quartz package cannot be found. A quick search for "quartz" in the Maven repository reveals [user_home]\.m2\repository\quartz\quartz\1.5.2\quartz-1.5.2.jar (or newer version) which has to be copied to [ServiceMix_home]\lib\quartz-1.5.2.jar - the error shall be resolved now. Of course, adding the directory containing the jar to the classpath is another possibility.
Very similar is
...
Caused by: java.lang.ClassNotFoundException: org.apache.servicemix.components.file.FileWriter
...
indicating that the whole servicemix-common package cannot be found. In the Maven repository, servicemix-components-3.0-incubating.jar (or newer version) can be found and copied to ServiceMix' lib directory. Note: As this is a ServiceMix' sub-project, the jar is available at [ServiceMix_home]\components as well.
Slightly trickier is
A short www search leads to Unrecognized xbean namespace mapping. With this information, one can infer that [user_home]\.m2\repository\org\apache\servicemix\servicemix-eip\3.0-incubating\servicemix-eip-3.0-incubating.jar (or newer version) has to be copied to [ServiceMix_home]\lib\servicemix-eip-3.0-incubating.jar so ServiceMix can find the classes.
Testing the Installation
If ServiceMix is up and running without problems, the Window's console window or the Unix command shell will display something similar to the following log line:
INFO - JBIContainer.init(421) | ServiceMix JBI Container ([http:
ServiceMix's default port is 1099. From another window run netstat and search for port 1099.
From a Windows console, type:
netstat -an | find "1099"
OR
From a Unix command shell, type:
top