Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.apache.camel.example</groupId>
	<artifactId>reportincident.web</artifactId>
	<packaging>war</packaging> (1)
	<version>1.0-SNAPSHOT</version>
	<name>Report Incident Web Bundle</name>

	<properties><parent>
		<wicket<groupId>org.version>1apache.3camel.5<example</wicket.version>groupId>
		<jetty.version>6.1.4</jetty.version>
		<felix-version>1.4.3</felix-version>
		<spring-version>2.5.6</spring-    <artifactId>reportincident.parent</artifactId>
	    <version>1.0-SNAPSHOT</version>
	</properties>parent>

	<dependencies>
		<dependency>
			<groupId>org.apache.camel.example</groupId>
			<artifactId>reportincident.service</artifactId>
			<version>1.0-SNAPSHOT</version>
			<scope>provided</scope>
		</dependency>
		
		<!-- SPRING DEPENDENCIES -->
	    <dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring-version}</version>
			<scope>provided</scope>
		</dependency>
	    <dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring-version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- 
	    <dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring-version}</version>
			<scope>provided</scope>
		</dependency>
		 -->
		<!--  WICKET DEPENDENCIES -->
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket</artifactId>
			<version>${wicket.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-spring-annot<spring</artifactId>
			<version>${wicket.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-ioc</artifactId>
			<version>${wicket.version}</version>
			<scope>provided</scope>
		</dependency>
                <dependency>
                        <groupId>org.apache.wicket</groupId>
			<artifactId>wicket-extensions</artifactId>
			<version>${wicket.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- LOGGING DEPENDENCIES - LOG4J -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.4.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
			<scope>test</scope>
		</dependency>

		<!--  JUNIT DEPENDENCY FOR TESTING -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.2</version>
			<scope>test</scope>
		</dependency>

		<!--  JETTY DEPENDENCIES FOR TESTING  -->
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-util</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-management</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<filtering>false</filtering>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<filtering>false</filtering>
				<directory>src/main/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<filtering>false</filtering>
				<directory>src/test/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
		</testResources>
		<plugins>

			<plugin>
				<inherited>true</inherited>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
					<optimise>true</optimise>
					<debug>true</debug>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1-alpha-2</version>
				<configuration>
					<archive>
						<!-- add the generated manifest to the war --> (2)
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
					<!-- 
					<webResources>
						<resource>
							<directory>src/main/resources/META-INF/spring</directory>
							<targetPath>META-INF/spring</targetPath>
						</resource>
					</webResources>
					 -->
				</configuration>

			</plugin>


			<!-- to generate the MANIFEST-FILE required by the bundle -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>${felix-version}</version>
				<extensions>true</extensions>
				<executions> (3)
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<supportedProjectTypes>
						<supportedProjectType>bundle</supportedProjectType> (3)
						<supportedProjectType>war</supportedProjectType>
					</supportedProjectTypes>
					<instructions>
						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
						<Bundle-ClassPath>
							.,
							WEB-INF/classes,
						</Bundle-ClassPath>
						<Import-Package>
							javax.servlet;version="[2.5.0, 3.0.0)",
							javax.servlet.http;version="[2.5.0, 3.0.0)",
							javax.servlet.resources;version="[2.5.0, 3.0.0)",
							org.apache.camel.example.reportincident.service,
							org.springframework.web.context;version="[2.5.6, 3.0.0)",
							org.springframework.web.context.support;version="[2.5.6, 3.0.0)",
							org.springframework.osgi.web.context.support,
							org.xml.sax;resolution:=optional,
							org.w3c.dom;resolution:=optional,
							*
						</Import-Package>
						<Private-Package>org.apache.camel.example.reportincident</Private-Package>
						<Export-Package></Export-Package>
						<Webapp-Context>reportincidentweb</Webapp-Context> (4)
						<_failok>true</_failok>
					</instructions>
				</configuration>

			</plugin>
		</plugins>
	</build>
</project>

...

To build the project, you must execute for each project the following maven commands command in the root of the installation directory :

Project name

maven command

reportincident.activemq

mvn clean install

reportincident.camelqueueservice

mvn clean install

reportincident.db

mvn clean install

reportincident.features

mvn clean install

reportincident.model

mvn clean install

reportincident.persistence

mvn clean install

reportincident.routing

mvn clean install

reportincident.service

mvn clean install

reportincident.web

mvn clean install

reportincident.webservice

mvn clean install

Note

To recreate the MANIFEST file in Eclipse, you can use the following maven command : org.ops4j:maven-pax-plugin:eclipse

Code Block

mvn clean install -Dtest=false  -DfailIfNoTests=false
Info
We will try to provide for the next version of this tutorial a parent pom.xml containing the modules to be build (wink)

Package

To simplify our deployment procedure, we will use the provisioning mechanism of Apache Felix Karaf called 'Feature'. In a feature xml file, we will define the bundles that we will package and their dependencies. The bundles can be linked to a feature and features can be linked together. This file will be packaged in a jar.

...

Code Block
xml
xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<features>
	
   <feature name="reportincident" version="1.0-SNAPSHOT">
	<bundle>mvn:org.apache.camel.example/reportincident.activemq/1.0-SNAPSHOT</bundle>
	<bundle>mvn:org.apache.camel.example/reportincident.queueservice/1.0-SNAPSHOT</bundle>
	<bundle>mvn:org.apache.camel.example/reportincident.model/1.0-SNAPSHOT</bundle>
	<bundle>mvn:org.apache.camel.example/reportincident.persistence/1.0-SNAPSHOT</bundle>
	<bundle>mvn:org.apache.camel.example/reportincident.service/1.0-SNAPSHOT</bundle>
	<bundle>mvn:org.apache.camel.example/reportincident.webservice/1.0-SNAPSHOT</bundle>
	<bundle>mvn:org.apache.camel.example/reportincident.routing/1.0-SNAPSHOT</bundle>
        <bundle>mvn:org.apache.camel.example/reportincident.web/1.0-SNAPSHOT/war</bundle>
    </feature>
	
    <feature name="transaction" version="1.0.0">
	<bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl/1.0.1-1_1</bundle>
   	<bundle>mvn:org.apache.geronimo.components/geronimo-transaction/2.2-r634076</bundle>
  	<bundle>mvn:org.apache.servicemix.transaction/org.apache.servicemix.transaction/1.0.0</bundle> 
    </feature>

    <feature name="connector" version="4.0.0">
        <feature version="1.0.0">transaction</feature>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0</bundle>
        <bundle>mvn:org.apache.geronimo.components/geronimo-connector/2.1.3</bundle>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle> 
        <bundle>mvn:org.springframework/spring-tx/2.5.6.SEC01</bundle>
        <bundle>mvn:org.jencks/jencks/2.2</bundle>
    </feature>
		
   <feature name="activemq" version="5.3.0">
        <feature version="4.0.0">connector</feature>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
        <bundle>mvn:commons-pool/commons-pool/1.4</bundle>
        <bundle>mvn:org.apache.xbean/xbean-spring/3.5</bundle>
        <bundle>mvn:org.apache.activemq/kahadb/5.3.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-core/5.3.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-ra/5.3.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-console/5.3.0</bundle>
        <bundle>mvn:org.apache.activemq/activemq-pool/5.3.0</bundle>
    </feature>
	
    <feature <!-- <bundle>mvn:org.apache.servicemix.activemq/org.apache.servicemix.activemq.commands/4.0.0</bundle> -->
    </feature>
	
    <feature name="activemq-camel" version="5.3.0">
	        <bundle>mvn:org.apache.activemq/activemq-camel/5.3.0</bundle>
    </feature>
	
    <feature name="spring-web">
        <bundle>mvn:org.springframework/spring-web/2.5.6.SEC01</bundle>
        <bundle>mvn:org.springframework.osgi/spring-osgi-web/1.2.0</bundle> 
    </feature>
   
    <feature name="hibernate">
        <bundle>mvn:org.springframework/spring-orm/2.5.6.SEC01</bundle>
        <bundle>mvn:org.springframework/spring-jdbc/2.5.6.SEC01</bundle>
    	<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_2</bundle>
    	<bundle>mvn:org.antlr/com.springsource.antlr/2.7.7</bundle>
    	<bundle>mvn:org.jgroups/com.springsource.org.jgroups/2.5.1</bundle>
    	<bundle>mvn:org.jboss.javassist/com.springsource.javassist/3.3.0.ga</bundle>
    	<bundle>mvn:org.hibernate/com.springsource.org.hibernate/3.3.1.GA</bundle>
    </feature>
    
    <feature name="jdbc-driver">
	<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_3</bundle>
    	<bundle>mvn:com.mysql.jdbc/com.springsource.com.mysql.jdbc/5.1.6<8</bundle>
    </feature>
    
    <feature name="wicket" version="1.34.67">
    	<bundle>mvn:org.apache.wicket/wicket/1.34.6<7</bundle>
    	<bundle>mvn:org.apache.wicket/wicket-ioc/1.34.6<7</bundle>
    	<bundle>mvn:org.apache.wicket/wicket-spring/1.34.6<7</bundle>
    	<!-- <bundle>mvn:org.apache.wicket/wicket-spring-annot/1.34.6<7</bundle> -->
    	<bundle>mvn:org.apache.wicket/wicket-extensions/1.34.6<7</bundle>
    </feature> 
     
</features>

To generate the jar file containing the feature xml file, adapt the pom.xml like this :

Code Block
xml
xml
    <feature name="http-reportingincident">
        <config name="org.ops4j.pax.web">
          org.osgi.service.http.port=8080
        </config>
        <bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle>
        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/6.1.14_1</bundle>
        <bundle>mvn:org.ops4j.pax.web/pax-web-api/0.7.1</bundle>
        <bundle>mvn:org.ops4j.pax.web/pax-web-spi/0.7.1</bundle>
        <bundle>mvn:org.ops4j.pax.web/pax-web-runtime/0.7.1</bundle>
        <bundle>mvn:org.ops4j.pax.web/pax-web-jetty/0.7.1</bundle>
        <bundle>mvn:org.ops4j.pax.web/pax-web-extender-war/0.7.1</bundle>
        <bundle>mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/0.7.1</bundle>
    </feature>
     
</features>

To generate the jar file containing the feature xml file, adapt the pom.xml like this :

...


<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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.apache.camel.example</groupId>
	<artifactId>reportincident.features</artifactId>
	<packaging>jar</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>Report Incident Project Features</name>

	<build>
		<resources>
			<!-- standard Maven folder -->
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<phase>copy-resources</phase>
						<goals>
							<goal>resources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
<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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.apache.camel.example</groupId>
	<artifactId>reportincident.features</artifactId>
	<packaging>jar</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>Reportincident :: Project Features</name>
	
	<parent>
		<groupId>org.apache.camel.example</groupId>
	    <artifactId>reportincident.parent</artifactId>
	    <version>1.0-SNAPSHOT</version>
	</parent>

	<build>
		<resources>
			<!-- standard Maven folder -->
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<phase>copy-resources</phase>
						<goals>
							<goal>resources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>

During the execution of the following maven command :

Code Block

mvn clean install

maven will put the file reportincident.features-1.0-SNAPSHOT-features.xml in the jar and the jar will be installed in your Maven local repository under the directory {{localMavenRepository/org/apache/camel/example/reportincident.features/1.0-SNAPSHOT

Deploy

The deployment process is very simple and two steps will be necessary :

Step 1 : Copy properties files in etc directory

Copy the files containing your properties file org.apache.camel.example.reportincident.datasource.cfg, ... in the etc directory of Apache Felix Karaf and customize them if required

Step 2 : Edit the file org.apache.felix.karaf.features.cfg

To use the feature file created in the previous section, we must adapt the file org.apache.felix.karaf.features.cfg that you find in the etc directory

Replace the current featureRepositories line with the following :

Code Block

featuresRepositories=mvn:org.apache.felix.karaf/apache-felix-karaf/1.4.0/xml/features,mvn:org.apache.camel.karaf/apache-camel/2.2.0/xml/features,jar:mvn:org.apache.camel.example/reportincident.features/1.0-SNAPSHOT!/reportincident.features-1.0-SNAPSHOT-features.xml

This line will be processed by PAX Url who will pickup the

During the execution of the maven command :

Code Block

mvn clean install

maven will put the file reportincident.features-1.0-SNAPSHOT-features.xml in file from the jar and the jar will be installed in your Maven local repository under the directory {{localMavenRepository/org/apache/camel/located in the maven repository localMavenRepo/org.apache.camel.example/reportincident.features/1.0-SNAPSHOT

Deploy

The deployment process is very simple and two steps will be necessary :

Step 1 : Copy properties files in etc directory

Copy the files containing your properties file org.apache.camel.example.reportincident.datasource.cfg, ... in the etc directory of Apache Felix Karaf and customize them if required

Step 2 : Edit the file org.apache.felix.karaf.features.cfg

To use the feature file created in the previous section, we must adapt the file org.apache.felix.karaf.features.cfg that you find in the etc directory

Replace the current featureRepositories line with the following :

Code Block

featuresRepositories=mvn:org.apache.felix.karaf/apache-felix-karaf/1.0.0/xml/features,mvn:org.apache.camel.karaf/features/2.1-SNAPSHOT/xml/features,jar:mvn:org.apache.camel.example/reportincident.features/1.0-SNAPSHOT!/reportincident.features-1.0-SNAPSHOT-features.xml

This line will be processed by PAX Url who will pickup the reportincident.features-1.0-SNAPSHOT-features.xml file from the jar located in the maven repository localMavenRepo/org.apache.camel.example/reportincident.features/1.0-SNAPSHOT

and

replace the existing line containing the featuresBoot parameter

by

Code Block

featuresBoot=spring,spring-dm,camel,camel-bindy,camel-jms,activemq,activemq-camel,http-reportingincident,spring-web,camel-cxf,hibernate,jdbc-driver,wicket,reportincident

By adding these two lines, we will configure our Apache Felix Karaf server to install bundles from features defined in the order appearing at the line of featuresBoot

Note

The deployment order of the bundle is critical in an OSGI environement. This is why for the purposes of this project/tutorial we have organised in consequence. If you plan to change something in the application, be aware of that

Warning

The /etc/system.property file must be modified to define the environment variable servicemix.base used by activemq bundle

Add the following line
servicemix.base=root

Test it

Step 1 : launch application

It is time to launch the karaf server and to test if our application works well. If this is not yet done, download Apache Felix Karaf 1.0.0 server and install it. Launch the server by executing the command in the bin folder:

Code Block

c:\apache-felix-karaf-1.0.0\bin>karaf
Info

If this is the first time that Karaf is started, then you will see that a new data folder is created. This directory will contain subfolders :

  • cache : containing the bundlles deployed
  • log : where the log file is updated by the application

Step 2 : Check osgi list

When the following prompt appears on the screen :

Code Block

c:\apache-felix-karaf-1.0.0\bin>karaf
        __ __                  ____
       / //_/____ __________ _/ __/
      / ,<  / __ `/ ___/ __ `/ /_
     / /| |/ /_/ / /  / /_/ / __/
    /_/ |_|\__,_/_/   \__,_/_/

  Apache Felix Karaf (1.0.0)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.

karaf@root>

execute the command :

Code Block

karaf@root:/> osgi:list
Tip

During the first launch of Karaf, it will install all the bundles defined in the features (one by one) in the order defined. 134 bundles must be deployed, so be patient because it can take time depending of your internet connection, cpu, processor of your machine.

but after a few minutes, you must see the following list

replace the existing line containing the featuresBoot parameter

by

Code Block

featuresBoot=spring,spring-dm,camel,camel-bindy,camel-jms,activemq,activemq-camel,http,war,spring-web,camel-cxf,hibernate,jdbc-driver,wicket,reportincident

By adding these two lines, we will configure our Apache Felix Karaf server to install bundles from features defined in the order appearing at the line of featuresBoot

Note

The deployment order of the bundle is critical in an OSGI environement. This is why for the purposes of this project/tutorial we have organised in consequence. If you plan to change something in the application, be aware of that

Warning

The /etc/system.property file must be modified to define the environment variable servicemix.base used by activemq bundle

Add the following line
servicemix.base=root

Test it

Step 1 : launch application

It is time to launch the karaf server and to test if our application works well. If this is not yet done, download Apache Felix Karaf 1.4.0 server and install it. Launch the server by executing the command in the bin folder:

Code Block

c:\apache-felix-karaf-1.4.0\bin>karaf
Info

If this is the first time that Karaf is started, then you will see that a new data folder is created. This directory will contain subfolders :

  • cache : containing the bundlles deployed
  • log : where the log file is updated by the application

Step 2 : Check osgi list

When the following prompt appears on the screen :

Code Block

c:\apache-felix-karaf-1.0.0\bin>karaf
        __ __                  ____
       / //_/____ __________ _/ __/
      / ,<  / __ `/ ___/ __ `/ /_
     / /| |/ /_/ / /  / /_/ / __/
    /_/ |_|\__,_/_/   \__,_/_/

  Apache Felix Karaf (1.4.0)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.

karaf@root>

execute the command :

Code Block

karaf@root:/> osgi:list
Tip

During the first launch of Karaf, it will install all the bundles defined in the features (one by one) in the order defined. 134 bundles must be deployed, so be patient because it can take time depending of your internet connection, cpu, processor of your machine.

but after a few minutes, you must see the following list

Code Block

karaf@root> osgi:list
START LEVEL 100
   ID   State         Blueprint      Spring    Level  Name
[   0] [Active     ] [            ] [       ] [    0] System Bundle (2.0.4)
[   1] [Active     ] [            ] [       ] [    5] OPS4J Pax Url - mvn: (1.1.2)
[   2] [Active     ] [            ] [       ] [    5] OPS4J Pax Url - wrap: (1.1.2)
[   3] [Active     ] [            ] [       ] [    8] OPS4J Pax Logging - API (1.4)
[   4] [Active     ] [            ] [       ] [    8] OPS4J Pax Logging - Service (1.4)
[   5] [Active     ] [            ] [       ] [   10] Apache Felix Configuration Admin Service (1.2.4)
[   6] [Active     ] [            ] [       ] [   10] Apache Felix Preferences Service (1.0.4)
[   7] [Active     ] [            ] [       ] [   11] Apache Felix File Install (2.0.8)
[   8] [Active     ] [Created     ] [       ] [   20] Apache Geronimo Blueprint Bundle (1.0.0)
[   9] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Features Management (1.4.0)
[  10] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Spring Deployer (1.4.0)
[  11] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Features Deployer (1.4.0)
[  12] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Shell Various Commands (1.4.0)
[  13] [Active     ] [            ] [       ] [   30] Apache Mina SSHD :: Core (0.3.0)
[  14] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Shell Development Commands (1.4.0)
[  15] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Features Core (1.4.0)
[  16] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Shell ConfigAdmin Commands (1.4.0)
[  17] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Shell PackageAdmin Commands (1.4.0)
[  18] [Active     ] [Created     ] [  
Code Block

karaf@root> osgi:list
START LEVEL 100
   ID   State         Blueprint      Spring    Level  Name
[   0] [Active     ] [   30] Apache Felix Karaf :: Blueprint Deployer (1.4.0)
[  19] [Active     ] [Created     ] [    0] System Bundle (2.0   ] [   30] Apache Felix Karaf :: JAAS Modules (1.4.0)
[   120] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: ShellAdmin Various CommandsManagement (1.04.0)
[   221] [Active     ] [ Created           ] [       ] [   30] Apache MINA Core (2.0.0.M6 Felix Karaf :: Shell OSGi Commands (1.4.0)
[   322] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Shell PackageAdminJAAS CommandsConfig (1.04.0)
[   423] [Active     ] [Created            ] [       ] [   30] Apache Felix Karaf :: JAAS Modules (1org.osgi.impl.bundle.jmx (4.2.0.0200907080519)
[   524] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: JAASFeatures ConfigCommand (1.04.0)
[   625] [Active     ] [Created            ] [       ] [   30] Apache Felix KarafGogo ::Shell BlueprintRuntime Deployer (10.02.02)
[   726] [Active     ] [Created            ] [       ] [   30] Apache Felix Karaf :: Shell Admin (1MINA Core (2.0.0.RC1)
[   827] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: Shell LogConsole Commands (1.04.0)
[   928] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: FeaturesAdmin CommandCore (1.04.0)
[  1029] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: ShellManagement SSH (1.04.0)
[  1130] [Active     ] [       Created     ] [       ] [   30] Apache MinaFelix SSHDKaraf :: CoreAdmin Command (01.24.0)
[  1231] [Active     ] [     Created       ] [       ] [   30] Apache Felix Karaf Gogo:: Shell Log RuntimeCommands (01.24.0)
[  1332] [Active     ] [Created     ] [       ] [   30] Apache Felix Karaf :: FeaturesShell CoreSSH (1.04.0)
[  1433] [Active     ] [Created            ] [       ] [   3060] Apache FelixServiceMix Karaf Bundles:: Managementaopalliance-1.0 (1.0.0.3)
[  1534] [Active     ] [            ] [       ] [   3060] org.osgi.impl.bundle.jmxSpring Core (42.25.06.200907080519SEC01)
[  1635] [Active     ] [Created     ] [       ] [   30    ] Apache[ Felix Karaf ::60] ShellSpring ConsoleBeans (12.5.06.0SEC01)
[  1736] [Active     ] [Created     ] [       ] [       30] Apache[ Felix Karaf ::60] ShellSpring OSGi CommandsAOP (12.5.06.0SEC01)
[  1837] [Active     ] [Created [            ] [       ] [   3060] Apache Felix Karaf :: Features Management (1.0.0Spring Context (2.5.6.SEC01)
[  1938] [Active     ] [Created     ] [       ] [   30    ] Apache[ Felix Karaf ::60] Spring Context DeployerSupport (12.5.06.0SEC01)
[  2039] [Active     ] [Created            ] [       ] [   3060] Apache FelixServiceMix KarafSpecs :: Features DeployerACTIVATION API 1.4 (1.04.0)
[  2140] [Active     ] [Created            ] [       ] [   3060] Apache FelixServiceMix KarafSpecs :: ShellJAXB ConfigAdminAPI Commands2.1 (1.04.0)
[  2241] [Active     ] [            ] [       ] [   1060] Apache Felix File Install (2.0 ServiceMix Specs :: STAX API 1.0 (1.4.0)
[  2342] [Active     ] [            ] [       ] [   1060] Apache FelixServiceMix Prefrences Service (1.0.2Bundles: jaxb-impl-2.1.12 (2.1.12.1)
[  2443] [Active     ] [            ] [       ] [   1060] Apache Felix Configuration Admin Service Commons Management (1.2.40)
[  2544] [Active     ] [            ] [       ] [    860] OPS4J Pax Logging - API (1.4camel-core (2.2.0)
[  2645] [Active     ] [            ] [       ] [    860] OPS4J Pax Logging - Service (1.4Spring Transaction (2.5.6.SEC01)
[  2746] [Active     ] [            ] [       ] [    560] OPS4J Pax Url - mvn: geronimo-jta_1.1_spec (1.01.01)
[  2847] [Active     ] [            ] [       ] [    560] OPS4JCommons Pax Url - wrap: Pool (1.05.04)
[  2948] [Active     ] [Created            ] [       ] [   20] Apache Geronimo Blueprint Bundle60] geronimo-jms_1.1_spec (1.01.01)
[  3049] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: aopalliance-1.0Spring JMS (12.05.06.3SEC01)
[  3150] [Active     ] [            ] [       ] [   60] Springcamel-jms Core (2.52.6.SEC010)
[  3251] [Active     ] [            ] [       ] [   60] Spring Beans (geronimo-servlet_2.5_spec (1.61.SEC012)
[  3352] [Active     ] [            ] [       ] [   60] Spring AOP (2.5.6.SEC01Apache ServiceMix Bundles: jetty-6.1.22 (6.1.22.1)
[  3453] [Active     ] [            ] [       ] [   60] Spring ContextOPS4J Pax Web - API (20.57.6.SEC012)
[  3554] [Active     ] [            ] [       ] [   60] Spring Context Support (2.5.6.SEC01 OPS4J Pax Web - Service SPI (0.7.2)
[  3655] [Active     ] [            ] [       ] [   60] ApacheOPS4J ServiceMixPax Bundles:Web cglib-2.1_3- Runtime (20.1.0.3_47.2)
[  3756] [Active     ] [            ] [       ] [   60] spring-osgi-io (1.2.0OPS4J Pax Web - Jetty (0.7.2)
[  3857] [Active     ] [            ] [       ] [   60] springcamel-osgi-corebindy (12.2.0)
[  3958] [Active     ] [            ] [       ] [   60] springactivemq-osgi-extendercamel (15.23.0)
[  4059] [Active     ] [            ] [Started] [      60] [Reportincident :: ActiveMQ 60] spring-osgi-annotationQueuing Engine (1.20.0.SNAPSHOT)
[  4160] [Active     ] [Failure     ] [      ] [Started] [   60] ApacheReportincident Felix Karaf :: SpringCamel Queuing DeployerService (1.10.0.SNAPSHOT)
[  4261] [Active     ] [            ] [       ] [   60] ApacheReportincident ServiceMix Specs :: ACTIVATION API 1.4Model Bundle (1.40.0.SNAPSHOT)
[  4362] [Active     ] [            ] [       Started] [   60] Apache ServiceMix SpecsReportincident :: JAXB API 2.1Persistence Bundle (1.40.0.SNAPSHOT)
[  4463] [Active     ] [            ] [       Started] [   60] Apache ServiceMix SpecsReportincident :: STAXService APIBundle (1.0 (1.4.0.SNAPSHOT)
[  4564] [Active     ] [            ] [       ] [   60] ApacheReportincident ServiceMix:: Bundles: jaxb-impl-2.1.12Webservice Bundle (21.10.120.1SNAPSHOT)
[  4665] [Active     ] [            ] [       Started] [   60] Commons Management Reportincident :: Routing Bundle (1.0.0.SNAPSHOT)
[  4766] [Active     ] [            ] [       ] [   60] camel-core Reportincident :: Web Bundle (21.10.0.SNAPSHOT)
[  4867] [Active     ] [            ] [       ] [   60] geronimo-jta_1.1_specApache ServiceMix Bundles: commons-dbcp-1.2.2 (1.12.2.13)
[  4968] [Active     ] [            ] [       ] [   60] Spring Transaction (2.5.6.SEC01 MySQL AB's JDBC Driver for MySQL (5.1.6)
[  5069] [Active     ] [            ] [       ] [   60] camel-spring-osgi Apache ServiceMix Bundles: cglib-2.1_3 (2.1.0.SNAPSHOT3_4)
[  5170] [Active     ] [            ] [       ] [   60] camelspring-osgi-bindyio (1.2.1.0.SNAPSHOT)
[  5271] [Active     ] [            ] [       ] [   60] Apache Commons Pool Bundle spring-osgi-core (1.2.40)
[  5372] [Active     ] [            ] [       ] [   60] geronimo-jms_1.1_specspring-osgi-extender (1.12.10)
[  5473] [Active     ] [            ] [       ] [   60] Spring JMSspring-osgi-annotation (1.2.5.6.SEC010)
[  5574] [Active     ] [Created     ] [       ] [   60] Apache Felix Karaf ]:: [Spring   60] camel-jms (2.1.0.SNAPSHOTDeployer (1.2.0)
[  5675] [Active     ] [            ] [       ] [   60] geronimocamel-j2ee-connector_1.5_specspring-osgi (2.02.0)
[  5776] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: howl-1.0.1-1 (1.0.1.1_1Spring Web (2.5.6.SEC01)
[  5877] [Active     ] [            ] [       ] [   60] Geronimo TxManager :: Transaction (2spring-osgi-web (1.2.0.r634076)
[  5978] [Active     ] [            ] [       ] [   60] Apache ServiceMix ServiceMix TransactionBundles: jetty-6.1.14 (6.1.014.01)
[  6079] [Active     ] [            ] [       ] [   60] GeronimoOPS4J Pax TxManagerWeb ::- ConnectorAPI (20.7.1.3)
[  6180] [Active     ] [            ] [       ] [   60] geronimo-servlet_2.5_spec (1.1.2 OPS4J Pax Web - Service SPI (0.7.1)
[  6281] [Active     ] [            ] [       ] [   60] Jencks (2.2 OPS4J Pax Web - Runtime (0.7.1)
[  6382] [Active     ] [            ] [       ] [   60] geronimo-j2ee-management_1.1_spec (1.0 OPS4J Pax Web - Jetty (0.7.1)
[  6483] [Active     ] [            ] [       ] [   60] xbean-spring (3.5Apache ServiceMix Bundles: asm-2.2.3 (2.2.3.3)
[  6584] [Active     ] [            ] [       ] [   60] kahadb (5.3.0 Apache ServiceMix Bundles: jetty-6.1.19 (6.1.19.2)
[  6685] [Active     ] [            ] [       ] [   60] activemq-core (5 Apache ServiceMix Bundles: commons-codec-1.3 (1.3.0.2)
[  6786] [Active     ] [            ] [       ] [   60] activemq-ra (5.3.0 Apache ServiceMix Bundles: jdom-1.1 (1.1.0.2)
[  6887] [Active     ] [            ] [       ] [   60] activemq-consolejettison (51.3.02)
[  6988] [Active     ] [            ] [       ] [   60] activemq-pool (5.3.0 Apache ServiceMix Bundles: ant-1.7.0 (1.7.0.3)
[  7089] [Active     ] [            ] [       ] [   60] activemq-camelApache ServiceMix Bundles: bcel-5.2 (5.32.0.2)
[  7190] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: jettyxalan-62.7.1.14 (62.7.1.14.12)
[  7291] [Active     ] [            ] [       ] [   60] OPS4JApache PaxServiceMix WebBundles: xercesImpl-2.9.1 API (02.79.1.3)
[  7392] [Active     ] [            ] [       ] [   60] OPS4JApache PaxServiceMix WebBundles: - Service SPI (0.7.1xmlbeans-2.4.0 (2.4.0.3)
[  7493] [Active     ] [            ] [       ] [   60] OPS4JApache PaxServiceMix WebBundles: - Runtimexmlsec-1.4.3 (01.4.73.12)
[  7594] [Active     ] [            ] [       ] [   60] OPS4JApache PaxServiceMix WebBundles: xmlresolver-1.2 Jetty (1.2.0.7.12)
[  7695] [Active     ] [            ] [       ] [   60] OPS4J Pax Web - Extender - WAR (Woodstox XML-processor (4.0.7.1)
[  7796] [Active     ] [            ] [       ] [   60] OPS4JStax2 Pax Web - Extender - Whiteboard (0.7API (3.0.1)
[  7897] [Active     ] [            ] [       ] [   60] Spring WebXmlSchema (21.4.5.6.SEC01)
[  7998] [Active     ] [            ] [       ] [   60] spring-osgi-web Commons Lang (1.2.04)
[  8099] [Active     ] [            ] [       ] [   60] ApacheCommons ServiceMix Bundles: asm-2.2.3 (2Collections (3.2.3.31)
[  81100] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: jettyantlr-62.17.147 (62.17.147.2)
[  82101] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: commons-codec-1.3oro-2.0.8 (12.30.08.23)
[  83102] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: jdomvelocity-1.16.2 (1.16.02.23)
[  84103] [Active     ] [            ] [       ] [   60] jettisonAxiom API (1.2.18)
[  85104] [Active     ] [            ] [       ] [   60] ApacheAxiom ServiceMix Bundles: ant-1.7.0 API (1.72.0.38)
[  86105] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: bcelmail-51.4.21 (51.24.01.2)
[  87106] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: xalanneethi-2.70.14 (2.70.14.2)
[  88107] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: xercesImplabdera-20.94.10-incubating (20.94.10.incubating_3)
[  89108] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: xmlbeans-2.4.0 (2.4.0.2geronimo-jaxws_2.1_spec (1.0)
[  90109] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: xmlsec-1.4.3geronimo-annotation_1.0_spec (1.41.3.21)
[  91110] [Active     ] [            ] [       ] [   60] Apache ServiceMix Specs Bundles:: SAAJ API xmlresolver-1.23 (1.24.0.2)
[  92111] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: woodstoxwsdl4j-31.6.2.8 (31.6.2.8.12)
[  93112] [Active     ] [            ] [       ] [   60] XmlSchema Apache ServiceMix Specs :: JSR311 API 1.0 (1.4.50)
[  94113] [Active     ] [            ] [       ] [   60] Commons Lang (2.4geronimo-ws-metadata_2.0_spec (1.1.2)
[  95114] [Active     ] [            ] [       Started] [   60] Commons CollectionsApache CXF Bundle Jar (32.2.16)
[  96115] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: antlrcommons-io-21.73.72 (21.73.72.23)
[  97116] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: oro-2.0.8 (camel-cxf (2.2.0.8.3)
[  98117] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: velocity-1.6.2 (1.6.2.3geronimo-j2ee-connector_1.5_spec (2.0.0)
[  99118] [Active     ] [            ] [       ] [   60] Axiom APIApache ServiceMix Bundles: howl-1.0.1-1 (1.0.21.81_1)
[ 100119] [Active     ] [            ] [       ] [   60] Axiom APIGeronimo TxManager :: Transaction (12.2.80.r634076)
[ 101120] [Active     ] [            ] [       Started] [   60] Apache ServiceMix Bundles: mail-1.4.1 Transaction (1.40.1.20)
[ 102121] [Active     ] [            ] [       ] [   60] ApacheGeronimo ServiceMixTxManager Bundles:: neethi-2.0.4Connector (2.0.42.1.3)
[ 103122] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: abdera-0.4.0-incubating (0.4.0.incubating_3Jencks (2.2)
[ 104123] [Active     ] [            ] [       ] [   60] geronimo-jaxwsj2ee-management_21.1_spec (1.0.1)
[ 105124] [Active     ] [            ] [       ] [   60] geronimo-annotation_1.0_specApache Commons Pool Bundle (1.1.14)
[ 106125] [Active     ] [            ] [       ] [   60] Apache ServiceMix Specs :: SAAJ API 1.3 (1.4.0.SNAPSHOTxbean-spring (3.5)
[ 107126] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: wsdl4j-1.6.2 (1.6.2.2kahadb (5.3.0)
[ 108127] [Active     ] [            ] [       ] [   60] Apache ServiceMix Specs :: JSR311 API 1.0 (1activemq-core (5.3.0)
[ 109128] [Active     ] [            ] [       ] [   60] geronimo-ws-metadata_2.0_specactivemq-ra (15.13.20)
[ 110129] [Active     ] [            ] [Started       ] [   60] Apache CXF Bundle Jar (2.2.4activemq-console (5.3.0)
[ 111130] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: commons-io-1.3.2 (1activemq-pool (5.3.2.30)
[ 112131] [Active     ] [            ] [       ] [   60] camel-cxf (2.1.0.SNAPSHOT OPS4J Pax Web - Jsp Support (0.7.2)
[ 113132] [Active     ] [            ] [       ] [   60] Spring ORMOPS4J Pax Web - Extender - WAR (20.57.6.SEC012)
[ 114133] [Active     ] [            ] [       ] [   60] Spring JDBC (2.5.6.SEC01 OPS4J Pax Web - Extender - Whiteboard (0.7.2)
[ 115134] [Active     ] [            ] [       ] [   60] OPS4J Pax ApacheUrl ServiceMix- Bundleswar:, dom4j-1.6.1war-i: (1.6.1.2)
[ 116135] [Active     ] [Created     ] [       ] [   60] Apache Felix Karaf ]:: [WAR Deployer  60] ANTLR (2.7.7(1.4.0)
[ 117136] [Active     ] [            ] [       ] [   60] JGroupsWicket Toolkit (21.54.17)
[ 118137] [Active     ] [            ] [       ] [   60] JavassistWicket JavaIoC Programmingcommon Assistantcode (31.34.0.ga7)
[ 119138] [Active     ] [            ] [       ] [   60] JBossWicket HibernateSpring Object-RelationalIntegration Mapper (31.34.1.GA7)
[ 120139] [Active     ] [            ] [       ] [   60] Apache ServiceMix Bundles: commons-dbcp-1.2.2Wicket Extensions (1.24.2.37)
[ 121140] [Active     ] [            ] [       ] [   60] MySQL AB's JDBC Driver for MySQLSpring ORM (2.5.16.6SEC01)
[ 122141] [Active     ] [            ] [       ] [   60] WicketSpring JDBC (12.35.6.SEC01)
[ 123142] [Active     ] [            ] [       ] [   60] Wicket IoC common codeApache ServiceMix Bundles: dom4j-1.6.1 (1.6.31.62)
[ 124143] [Active     ] [            ] [       ] [   60] Wicket SpringANTLR Integration (12.37.67)
[ 125144] [Active     ] [            ] [       ] [   60] WicketJGroups Spring Integration through Annotations (1.3.6Toolkit (2.5.1)
[ 126145] [Active     ] [            ] [       ] [   60] Wicket ExtensionsJavassist Java Programming Assistant (13.3.0.6ga)
[ 127146] [Active     ] [            ] [Started       ] [   60] ActiveMQ Queuing engine (1.0.0.SNAPSHOT)
[ 128] [Active     ] [JBoss Hibernate Object-Relational Mapper (3.3.1.GA)
Warning

If errors happen during installation of the bundles, the list could be not completed. In this is the case, the feature provisioning system has stopped the installation. You have to check the log file of karaf and depending of the error reported, correction made, the installation can be relaunched in the menu 'feature' using the command :

Code Block

karaf@root> features:list
  State          Version       Name
[uninstalled] 
[Started]
 [   
60]
 
Camel
 
Queuing
 
Service (1
0.0.0
.SNAPSHOT) [ 129
] hibernate

karaf@root> features:install hibernate

If a problem occurs with a bundle, you can by example recompile the code, regenerate the jar and update the bundle using the command

Code Block

karaf@root> osgi:update xxx

where xxx corresponds to the bundle to be updated

The features list can also be very helpfull to see which features has been installed

karaf@root> features:list State
 repo-0
[installed  ] [2.2.0       ] camel-cxf         
Version
       
Name
repo-0
[uninstalled] 
[
[2.2.0       ] camel-cache              repo-0
.0.0] hibernate karaf@root> features:install hibernate

If a problem occurs with a bundle, you can by example recompile the code, regenerate the jar and update the bundle using the command

Code Block

karaf@root> features:list

State[Active     ] [            ] [       ] [  Version 60] Report Incident Model Bundle (1.0.0.SNAPSHOT)
[ 130] [ActiveName     ] [            ] [Failed ] Repository
[installed   60] Report Incident Persistence Bundle (1.0.0.SNAPSHOT)
[ 131] [Active[2.2.0       ] [camel            ] [Waiting] [   60] Report Incident Service Bundle (1.0.0.SNAPSHOT) repo-0
[installed 132 ] [Active2.2.0     ] [ ] camel-core          ] [    repo-0
[installed   ] [2.2.0    60] Report Incident Webservice Bundle (1.0.0.SNAPSHOT)
[ 133] [Active] camel-spring-osgi        repo-0
[uninstalled] [ 2.2.0       ] camel-spring   ] [Waiting] [   60] Report Incident Routing Bundle (1.0.0.SNAPSHOT)repo-0
[ 134uninstalled] [Active2.2.0       ] [camel-osgi               repo-0
[uninstalled] [2.2.0       ] [ camel-test          60] Report Incident Web Bundle (1.0.0.SNAPSHOT)
Warning
Code Block

If errors happen during installation of the bundles, the list could be not completed. In this is the case, the feature provisioning system has stopped the installation. You have to check the log file of karaf and depending of the error reported, correction made, the installation can be relaunched in the menu 'feature' using the command :

Code Block
Code Block

karaf@root> osgi:update xxx

where xxx corresponds to the bundle to be updated

The features list can also be very helpfull to see which features has been installed


karaf@root> features:list
State  
[uninstalled] [2.2.0       ] camel-castor             repo-0
[uninstalled] [2.2.0       ] camel-dozer       Version       repo-0
[uninstalled] [2.2.0  Name     ] camel-http               Repositoryrepo-0
[installed  uninstalled] [2.1-SNAPSHOT2.0  ] camel    ] camel-mina               repo-0
[installed  uninstalled] [2.2.1-SNAPSHOT0       ] camel-core-jetty              repo-0
[uninstalled] [2.2.0       ] camel-servlet            repo-0
[installed  ] [2.2.1-SNAPSHOT  ] camel-spring-osgi0       ] camel-jms                repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-springamqp               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-osgiatom               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-testbam                repo-0
[uninstalledinstalled  ] [2.1-SNAPSHOT2.0       ] camel-cxfbindy                repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-cachecometd              repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-castorcsv                repo-0
[uninstalled] [2.1-SNAPSHOT2.0   ] camel-http   ] camel-flatpack           repo-0
[uninstalled] [2.2.1-SNAPSHOT0  ] camel-mina    ] camel-freemarker          repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-jettyftp                repo-0
[uninstalled] [2.1-SNAPSHOT [2.2.0       ] camel-servletguice              repo-0
[installed  uninstalled] [2.2.1-SNAPSHOT0       ] camel-jmsgroovy                repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-amqphl7                repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-atom  ibatis             repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-bamirc                repo-0
[installed  uninstalled] [2.1-SNAPSHOT2.0       ] camel-bindyjaxb               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-cometdjcr                repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-csv jing               repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-flatpackjdbc               repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-freemarkerjosql              repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-ftpjpa                repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-guicejxpath              repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-groovyjuel               repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-hl7 ldap               repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-ibatismail               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-ircmsv                repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-jaxbmvel               repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-jcr ognl               repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-jingprinter               repo-0
[uninstalled] [2.1-SNAPSHOT2.0   ] camel-jdbc   ] camel-protobuf           repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-josql quartz             repo-0
[uninstalled] [2.2.1-SNAPSHOT0   ] camel-jpa   ] camel-restlet            repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-jxpathrmi                repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-juelrss                repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-ldap saxon              repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-mailscala               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-msvscript                repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-mvelsmpp               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-ognlsnmp               repo-0
[uninstalled] [2.2.1-SNAPSHOT0  ] camel-printer            ] camel-spring-integration repo-0
[uninstalled] [2.1-SNAPSHOT] [2.2.0       ] camel-quartzsql                repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-restletstream             repo-0
[uninstalled] [2.1-SNAPSHOT2.0  ] camel-rmi       ] camel-string-template         repo-0
[uninstalled] [2.1-SNAPSHOT2.0   ] camel-rss   ] camel-tagsoup            repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-saxonvelocity              repo-0
[uninstalled] [2.2.1-SNAPSHOT0       ] camel-scala   xmlbeans           repo-0
[uninstalled] [2.1-SNAPSHOT2.0  ] camel-script    ] camel-xmlsecurity        repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-snmpxmpp               repo-0
[uninstalled] [2.1-SNAPSHOT2.0       ] camel-spring-integration repo-0
[uninstalled] [2.1-SNAPSHOT  ] camel-spring-javaconfigxstream            repo-0
[uninstalledinstalled  ] [2.1-SNAPSHOT.5.6.SEC01 ] spring  ] camel-sql                repokaraf-1.4.0
[uninstalledinstalled  ] [1.2.1-SNAPSHOT0       ] camel-streamspring-dm                repokaraf-1.4.0
[uninstalled] [2.1-SNAPSHOT1.4.0  ] camel-string-template    repo-0
[uninstalled] [2.1-SNAPSHOT  ] camel-tagsoup] wrapper                  repokaraf-1.4.0
[uninstalled] [2.1-SNAPSHOT1.4.0       ] camel-velocity obr                      repokaraf-1.4.0
[uninstalledinstalled  ] [2.1-SNAPSHOT1.4.0     ] camel-xmlbeans ] http         repo-0
[uninstalled] [2.1-SNAPSHOT  ] camel-xmlsecurity        repokaraf-1.4.0
[uninstalledinstalled  ] [2.1-SNAPSHOT  ] camel-xmpp1.4.0       ] war        repo-0
[uninstalled] [2.1-SNAPSHOT  ] camel-xstream            repokaraf-1.4.0
[installed  uninstalled] [21.54.6.SEC010   ] spring   ] webconsole               karaf-1.04.0
[installed  ] [1.24.0       ] ssh   ]   spring-dm                karaf-1.04.0
[uninstalledinstalled  ] [1.04.0         ] wrappermanagement                  karaf-1.04.0
[uninstalledinstalled  ] [1.0.0-SNAPSHOT] reportincident           repo-0
[installed  ] obr[1.0.0       ] transaction              karafrepo-1.0.0
[uninstalledinstalled  ] [14.0.0         ] httpconnector                     karaf-1.0.repo-0
[uninstalledinstalled  ] [15.03.0       ] activemq ] webconsole               karafrepo-1.0.0
[uninstalledinstalled  ] [15.03.0         ] sshactivemq-camel                      karaf-1.0.0
[uninstalledrepo-0
[installed  ] [10.0.0         ] managementspring-web               karafrepo-1.0.0
[installed  ] [20.5.6.SEC010.0    ] spring  ] hibernate                karafrepo-1.1.0-SNAPSHOT
[installed  ] [10.20.0         ] springjdbc-dmdriver                karaf-1.1.0-SNAPSHOT
[uninstalledrepo-0
[installed  ] [1.1.0-SNAPSHOT] wrapper4.7       ] wicket                   karafrepo-1.1.0-SNAPSHOT
[uninstalled] [10.10.0-SNAPSHOT] obr      ] http-reportingincident   repo-0

Step 3 : Incident file

To test the Camel routing, we have to produce an incident file report and put it in the file defined in the from uri of your inittial route. Create a file containing csv lines :

Code Block

001,29-04-2009,Claus,Ibsen,incident camel-001,this is a report incident for camel-001,cibsen@gmail.com,+111 10 20 300
002,29-04-2009,Charles,Moulliard,incident smx-002,this is a report incident for smx-002,cmoulliard@gmail.com,+222 10 20 300
003,28-04-2009,Guillaume,Nodet,incident camel-123,this is a report incident for camel-123,gnodet@gmail.com,+333 10 20 300
004,25-04-2009,Gert,Vanthienen,incident camel-454,this is a report incident for camel-454,gvanthienen@gmail.com,+444 10 20 300
005,24-04-2009,James,Anstey,incident smx-023,this is a report incident for smx-023,janstey@gmail.com,+555 10 20 300
007,01-04-2009,Willem,Jiang,incident smx-456,this is a report incident for smx-456,wjiang@gmail.com,+666 10 20 300
008,27-04-2009,Matt,Raibble,incident appfuse-123,this is a report incident for appfuse-123,mraibble@gmail.com,+777 10 20 300
009,12-04-2009,Jean-Baptiste,Onofré,incident smx3-088,this is a report incident for smx3-088,cjbonofre@gmail.com,+888 10 20 300
010,17-04-2009,Hadrian,Zbarcea,incident camel-005,this is a report incident for camel-005,hzbarcea@gmail.com,+999 10 20 300

Save your file and copy it in the folder

Check the log of SMX and you must see something like this

log_file_servicemix.txt

Next, open the web page of your application : http://localhost:8080/reportincidentweb/

Image Added

Step 4 : Call a webservice

You can use the tool Soapui to call the web service of the application.

Use the following url from Soapui, to generate the client interface to communicate with the web service : http://localhost:8080/cxf/camel-example/incident?wsdl.

Call the web service with the request : http://localhost:8080/cxf/camel-example/incident
and the following SOAP message request by example :

Code Block
xml
xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rep="http://reportincident.example.camel.apache.org">
   <soapenv:Header/>
   <soapenv:Body>
      <rep:inputReportIncident>
   karaf-1.1.0-SNAPSHOT
[uninstalled] [1.1.0-SNAPSHOT] http                     karaf-1.1.0-SNAPSHOT
[uninstalled] [1.1.0-SNAPSHOT] webconsole               karaf-1.1.0-SNAPSHOT
[uninstalled] [1.1.0-SNAPSHOT] ssh                      karaf-1.1.0-SNAPSHOT
[uninstalled] [1.1.0-SNAPSHOT] management               karaf-1.1.0-SNAPSHOT
[uninstalled] [1.0-SNAPSHOT  ] reportincident           repo-0
[installed  ] [1.0.0         ] transaction              repo-0
[installed  ] [4.0.0         ] connector                repo-0
[installed  ] [5.3.0         ] activemq                 repo-0
[installed<incidentId>000</incidentId>
  ] [5.3.0         ] activemq-camel<incidentDate>29-04-2009</incidentDate>
           repo-0
[uninstalled] [0.0.0<givenName>Charles</givenName>
         <familyName>Moulliard</familyName>
 ] spring-web       <summary>This is an web service report incident</summary>
  repo-0
[uninstalled] [0.0.0      <details>This is an ]web hibernateservice report incident,This is an web service report incident.</details>
        repo-0
[uninstalled] [0.0.0 <email>cmoulliard@gmail.com</email>
         ] jdbc-driver   <phone>+222 10 20 30 40</phone>
      </rep:inputReportIncident>
     repo-0
[uninstalled] [1.3.6         ] wicket                   repo-0
[uninstalled] [0.0.0         ] http-reportingincident   repo-0

...

</soapenv:Body>
</soapenv:Envelope>

Check the Karaf log :

log_file_servicemix2.txt

and web screen result : http://localhost:8080/reportincidentweb/

Image Added

Conclusion

Well, this tutorial was a little bit long but we have tried to provide you all the required information to design a real application using Apache Camel, Felix Karaf, OSGI, CXF and Apache Wicket frameworks. We hope that we have reached the goals defined in the introduction and will continue to improve its content based on Apache frameworks evolution. A part which is not covered but we plan to add it in the future concerns the testing/debugging of the application and transactional aspects.

#Resources

  • Attachments
    patterns.*part2.zip