Installation on Apache Karaf
Installing Red Hat JBoss Fuse on the Apache Karaf container
Copyright © 2011-2015 Red Hat, Inc. and/or its affiliates.
Abstract
Chapter 1. Installation Prerequisites
Abstract
Supported platforms
Java Runtime
C:\Program Files\Java\jde7 is not an acceptable install path and will lead to unpredictable errors in Red Hat JBoss Fuse at run time.
Supported Standards
Hardware requirements
- Full Installation
- 700 MB of free disk space
- 2 GB of RAM
Chapter 2. Installation Types
2.1. Overview of Installation Packages
Chapter 3. Installing
Abstract
Getting the archive
- Select Fuse, listed under Integrated Platforms, in the sidebar menu.
- Select
6.2.1from the Version drop-down list on the Software Downloads page. - Click the Download button next to the Red Hat JBoss Fuse 6.2.1 on Karaf Installer file.
Unpacking the archive
.zip file. Using a suitable archive tool, such as Zip, unpack Red Hat JBoss Fuse into a directory to which you have full access.
C:\Documents and Settings\Greco Roman\Desktop\fusesrc.
#, %, ^, ".
Using the IBM JDK
saaj-api jar from the installDir/lib/endorsed library using the following command:
rm lib/endorsed/org.apache.servicemix.specs.saaj-api-1.3-2.5.0.jar
- Before invoking the
./bin/fusescript:, set theJAVA_OPTSenvironment variable as follows:JAVA_OPTS=-Xshareclasses:none
Chapter 4. Adding a Remote Console User
Abstract
4.1. Add a User
InstallDir/etc/users.properties.
- Open
InstallDir/etc/users.propertiesin your favorite text editor. - Locate the line
#admin=admin,admin,manager,viewer,Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser.This line specifies a useradminwith the passwordadminand comma-separated list of roles. - Uncomment the line by removing the leading
#. - Change the first
adminto the desired user name. - Change the second
adminto the desired password. - Leave the role list,
admin,manager,viewer,Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser, as is. - Save the changes.
Chapter 5. Offline Mode
Abstract
5.1. Supported Functionality
- Runtime dependencies—the dependencies required to run the JBoss Fuse container, in its default configuration.
- Build-time dependencies—the dependencies required to build a custom application (which might include third-party libraries).
- Running the JBoss Fuse container in its default configuration—is supported in offline mode. The default configuration of the JBoss Fuse container is specified by the
featuresBootproperty in theetc/org.apache.karaf.features.cfgfile. The requisite dependencies are all provided in thesystem/sub-directory of the installation. - Installing additional features—is, in general, not supported in offline mode. In principle, you can use the
features:installcommand to install any of the features from the standard feature repositories (as specified by thefeaturesRepositoriesproperty in theetc/org.apache.karaf.features.cfgfile), but the majority of these features must be downloaded from the Internet and are thus not supported in offline mode. - Deploying custom applications—is, in general, not supported in offline mode. There may be some cases where an application with a minimal set of build-time dependencies is deployable offline, but in general, custom applications would have third-party dependencies that require an Internet connection (so that JAR files can be downloaded by Apache Maven).
Chapter 6. Monitor Fuse Resources
Abstract
6.1. Installation Procedure
Fuse Plugin Pack for JBoss ON 3.3:
- Navigate to the Red Hat Software Downloads page on the Red Hat Customer Portal.
- Select JBoss ON for Fuse under Management in the sidebar menu (or using the drop-down menu for the Products field).
- Make sure
3.3appears in the Version drop-down list on the Software Downloads page. - Click Download next to Fuse Plugin Pack for Red Hat JBoss Operations Network 3.3 .
- Unzip the plugin package (
jon-plugin-pack-fuse-3.3.0.GA.zip) into a temporary directory (for example,/installDir/server/). - Install the jar files in one of two ways:
- Hot DeployCopy the unpacked jar files into the JBoss Operations Network's
/installDir/server/plugins/directory. For details, see the JBoss Operations Network Installation Guide. - JON Server UIFor details, see the JBoss Operations Network Installation Guide, or watch the video Installing JBoss Operations Network - Part 4, Installing JON Agent Plugins.
Chapter 7. Getting Started with SwitchYard on Apache Karaf
7.1. SwitchYard
Figure 7.1. SwitchYard Visual Editor

7.2. Installing SwitchYard on Apache Karaf
installDir/system/org/switchyard/karaf/switchyard/2.0.1.redhat-620117/switchyard-2.0.1.redhat-620117-core-features.xml.
Procedure 7.1. Install SwitchYard Manually
- Start the Apache Karaf container:
./installDir/bin/fuse
- List the available SwitchYard features by entering the following console command. If this is a fresh instance, they will all be uninstalled at this point.
JBossFuse:karaf@root> features:list | grep switchyard
- Install the core SwitchYard components by entering the following console command:
JBossFuse:karaf@root> features:install switchyard
- List the SwitchYard features again. You will now see that SwitchYard (the switchyard feature) has been installed, along with its dependencies as defined by the SwitchYard features file.
7.3. SwitchYard Quickstart Applications
installDir/quickstarts/switchyard.
- Start the Apache Karaf container:
./installDir/bin/fuse
- Install the application by entering the following console command:
JBossFuse:karaf@root> features:install switchyard-quickstart-APP_NAME
Readme.md file for each.
Readme.md file. SwitchYard features are already defined in installDir/system/org/switchyard/karaf/switchyard/2.0.1.redhat-620117/switchyard-2.0.1.redhat-620117-core-features.xml.
7.4. Installing Your First Quickstart Application
camel-quartz-binding quickstart application. This application makes use of the camel-quartz component which schedules a logging service to run every second.
- Start the Apache Karaf container:
./installDir/bin/fuse
- List the available SwitchYard features by entering the following console command. If this is a fresh instance, they will all be uninstalled at this point.
JBossFuse:karaf@root> features:list | grep switchyard
Install thecamel-quartz-bindingapplication by entering the following console command:JBossFuse:karaf@root> features:install switchyard-quickstart-camel-quartz-binding
- List the SwitchYard features again. You will now see that the camel-quartz-binding application (the switchyard-quickstart-camel-quartz-binding feature) has been installed, along with its dependencies as defined by the SwitchYard features file.
- View the output from the installed (and running) application by entering the following console command:
JBossFuse:karaf@root> log:tail
installDir/quickstarts/switchyard/camel-quartz-binding/Readme.md.
7.5. What's Next?
Chapter 8. Install Red Hat JBoss Development Tools
8.1. Install Red Hat JBoss Developer Studio
8.2. Install Red Hat JBoss Developer Studio Integration Stack
Appendix A. Installing the Apache Components
Abstract
extras directory.
A.1. Zip Archives for the Apache Components
extras directory.
- apache-camel-2.15.1.redhat-621084.zip
- apache-cxf-3.0.4.redhat-621084.zip
C:\Documents and Settings\Greco Roman\Desktop\fusesrc.
Appendix B. Red Hat JBoss Fuse Maven Repositories
Abstract
settings.xml file, where required artifacts are located.
B.1. Maven Repositories
- JBoss Fuse repositoryProvides access to the artifacts in the Red Hat JBoss Fuse Maven repository. This repository is required.
https://repo.fusesource.com/nexus/content/groups/public/ - JBoss Fuse Snapshots repositoryProvides access to the artifacts in the Red Hat JBoss Fuse snapshot kit. This repository is not required, but it is useful if you want to experiment with building your project using different versions of the supplied archetypes.
https://repo.fusesource.com/nexus/content/groups/public-snapshots/ - Apache Public repositoryProvides access to the artifacts in the Apache Maven repository. This repository is not required, but it is useful to include as Red Hat JBoss Fuse depends on various Apache artifacts.
https://repository.apache.org/content/groups/public/
Appendix C. Generating a Custom Assembly or an Offline Repository
Overview
Custom assembly
quickstart/custom, which demonstrates how this toolchain works and provides you with the starting point for creating your own custom assemblies.
Patched custom assembly
Offline repository
quickstart/custom example
quickstart/custom example provides a template for generating your own custom assembly. The default configuration of the custom example includes a very minimal collection of Karaf features. You can easily customize this configuration to specify example which Karaf features you would like to include in the custom assembly.
Procedure to generate a custom assembly or an offline repository
- Choose the appropriate starting point for this procedure:
- To generate a custom assembly—download and install the standard Full Install from the Red Hat Customer Portal, as described in Chapter 3, Installing; or
- To generate a patched custom assembly—download the latest rollup patch from the Red Hat Customer Portal.
- Go to the
InstallDir/quickstarts/customproject. - Customize the features that will be included in the custom assembly's
system/directory (or in the generated offline repository) by editing the project'spom.xmlfile. Thepatchfeature and thefabricfeature are both required, and must be added to the configuration.Open thequickstarts/custom/pom.xmlfile in a text editor, search for thefeatures-maven-pluginplug-in configuration, and add thepatchfeature and thefabricfeature as children of theconfiguration/featuresXML element—for example:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> ... <build> <plugins> ... <!-- Step 3: gather all the bundles for the features your want to install --> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>features-maven-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <id>add-features</id> <goals> <goal>add-features-to-repo</goal> </goals> <phase>generate-resources</phase> <configuration> ... <features> <!-- TODO: add the feature you want to use in your custom assembly to the list below --> <feature>shell</feature> <feature>admin</feature> <feature>management</feature> <feature>camel-blueprint</feature> <feature>camel-jaxb</feature> <feature>patch</feature> <feature>fabric</feature> </features> <repository>target/repository</repository> </configuration> </execution> </executions> ... </plugin> ... </plugins> </build> ... </project> - (Not required for an offline repository) Customize the list of features that will be installed automatically when the custom assembly's container first starts. The
patchfeature and thefabricfeature are both required, and must be added to this list.Open thesrc/main/filtered-resources/etc/org.apache.karaf.features.cfgfile and modify thefeaturesBootproperty setting as required, adding at least thefabricfeature and thepatchfeature to the list:... # TODO: list the boot features for your own assembly below featuresBoot=shell,admin,management,fabric,patch,camel-blueprint,camel-jaxb
- After customizing the configuration of the
quickstarts/customproject, build the project as follows:mvn clean package
- The offline repository is now available in the following directory:
InstallDir/quickstarts/custom/target/repository
If the purpose of this build is to create an offline repository, the procedure is now finished and you can skip the remaining steps. - The result of building this project is a custom assembly file, in the following location:
InstallDir/quickstarts/custom/target/custom-distro-ProductVersion-bin.zip
- The custom assembly requires some additional modifications. In preparation for this, unpack the custom assembly file,
custom-distro-ProductVersion-bin.zip, into a convenient working location on the file system:Working/custom-distro-ProductVersion-bin
- To reduce the size of the custom assembly, delete the
extras/subdirectory fromcustom-distro-ProductVersion-bin(saving about 67 MB). - Create a new baseline archive for the custom assembly, as follows:
- Make a copy of the entire
Working/custom-distro-ProductVersion-bindirectory, to give a copy like the following:Working/custom-distro-ProductVersion-bin(copy)
- Rename the copied directory,
custom-distro-ProductVersion-bin(copy), to the following:jboss-fuse-full-ProductVersion-baseline
For example, if theProductVersionis 6.2.1.redhat-084, the new directory name must bejboss-fuse-full-6.2.1.redhat-084-baseline. - Delete the
system/subdirectory from thejboss-fuse-full-ProductVersion-baselinedirectory. - Using an archive tool, compress the
jboss-fuse-full-ProductVersion-baselinedirectory in Zip format to give the following archive file:jboss-fuse-full-ProductVersion-baseline.zip
The preceding file is the baseline archive for the custom assembly.
- Copy the baseline archive to the following subdirectory (must be created) of the original custom assembly,
Working/custom-distro-ProductVersion-bin:system/org/jboss/fuse/jboss-fuse-full/ProductVersion
- The custom assembly,
Working/custom-distro-ProductVersion-bin, is now complete. If you like, you can compress this directory into a Zip archive and distribute it as is. - Test the new custom assembly to make sure it is working properly. Launch the Karaf container, as follows:
cd Working/custom-distro-ProductVersion-bin/bin ./fuse
The container should start up without error. To make sure that no errors have occurred, check the log:JBossFuse:karaf@root> log:display
You can also check to see whether all of the expected Karaf features are installed:JBossFuse:karaf@root> features:list -i
When you are finished testing the custom assembly container, shut it down by entering theshutdownconsole command, and tidy up the custom assembly installation by removing thedata/subdirectory (which holds the data from the current container instance).
Troubleshooting
- The following error indicates that the baseline archive was not correctly installed in the
systemdirectory:ERROR: Bundle org.apache.felix.framework [0] EventDispatcher: Error during dispatch. (io.fabric8.patch.management.PatchException: Can't find baseline distribution in patches dir or inside system repository.) io.fabric8.patch.management.PatchException: Can't find baseline distribution in patches dir or inside system repository. at io.fabric8.patch.management.impl.GitPatchManagementServiceImpl.trackBaselineRepository(GitPatchManagementServiceImpl.java:1820) at ... - The following error indicates that the
patchfeature is not deployed in the container:Bundle listed in startup.properties configuration not found: io/fabric8/patch/patch-management/1.2.0.redhat-621092/patch-management-1.2.0.redhat-621092.jar Could not create framework: java.lang.Exception: Aborting due to missing startup bundles java.lang.Exception: Aborting due to missing startup bundles at org.apache.karaf.main.Main.processConfigurationProperties(Main.java:1281) at org.apache.karaf.main.Main.loadStartupProperties(Main.java:1082) at org.apache.karaf.main.Main.launch(Main.java:346) at org.apache.karaf.main.Main.main(Main.java:561)
- The following error indicates that the
patchfeature was successfully deployed, but the requiredfabricfeature is missing:ERROR: Bundle io.fabric8.patch.patch-core [49] Error starting mvn:io.fabric8.patch/patch-core/1.2.0.redhat-621092 (org.osgi.framework.BundleException: Unresolved constraint in bundle io.fabric8.patch.patch-core [49]: Unable to resolve 49.0: missing requirement [49.0] osgi.wiring.package; (&(osgi.wiring.package=io.fabric8.api)(version>=1.2.0)(!(version>=2.0.0))))
Legal Notice
Trademark Disclaimer
