1 Reply Latest reply on Feb 13, 2017 3:44 PM by coendenatris

    Unable to start blueprint container for bundle due to unresolved dependencies

    coendenatris

      Hi, I am new at jboss fuse and i started out with a simple example. Although the route is simple it is difficult to get it running.

       

      jboss-fuse 6.3.0.redhat-187

      Developer Studio: 10.2.0.GA

       

      Any help is welcome.

       

      Regards,

      Coen

       

      Message

      Unable to start blueprint container for bundle testBindy/1.0.0.SNAPSHOT due to unresolved dependencies [(&(dataformat=bindy)(objectClass=org.apache.camel.spi.DataFormatResolver))]

       

      Stack Trace

      ["java.util.concurrent.TimeoutException","\tat org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:343)[23:org.apache.aries.blueprint.core:1.4.5][org.apache.aries.blueprint:org.apache.aries.blueprint.core:1.4.5 org.apache.aries.blueprint:org.apache.aries.blueprint.core.compatibility:1.0.0]","\tat org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[23:org.apache.aries.blueprint.core:1.4.5][org.apache.aries.blueprint:org.apache.aries.blueprint.core:1.4.5 org.apache.aries.blueprint:org.apache.aries.blueprint.core.compatibility:1.0.0]","\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_71]","\tat java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71]","\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_71]","\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_71]","\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_71]","\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_71]","\tat java.lang.Thread.run(Thread.java:745)[:1.7.0_71]"]

       

      blueprint.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!--

          JBoss, Home of Professional Open Source

          Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual

          contributors by the @authors tag. See the copyright.txt in the

          distribution for a full listing of individual contributors.

       

          Licensed 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.

      -->

      <!--

         This is the OSGi Blueprint XML file defining the Camel context and routes.  Because the file is in the

         OSGI-INF/blueprint directory inside our JAR, it will be automatically activated as soon as the bundle is installed.

       

         The root element for any OSGi Blueprint file is 'blueprint' - you also see the namespace definitions for both the Blueprint

         and the Camel namespaces.

      -->

      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd                            http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">

          <!--

            The namespace for the camelContext element in Blueprint is 'https://camel.apache.org/schema/blueprint'. Additionally,

            we can also define namespace prefixes we want to use them in the XPath expressions in our CBR.

       

            While it is not required to assign id's to the <camelContext/> and <route/> elements, it is a good idea

            to set those for runtime management purposes (logging, JMX MBeans, ...)

          -->

          <camelContext id="_context1" xmlns="http://camel.apache.org/schema/blueprint">

              <route id="_route1">

                  <from id="_from1" uri="file:/Users/xxxxx/Documents/Software Development/file_exchange/input"/>

                  <split id="_split1" streaming="true">

                      <tokenize token="\n" trim="false"/>

                      <unmarshal id="_unmarshal1">

                          <bindy type="Csv"/>

                      </unmarshal>

                      <log id="_log1" message="${body}"/>

                  </split>

              </route>

          </camelContext>

      </blueprint>

       

      pom.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

        <modelVersion>4.0.0</modelVersion>

        <artifactId>filebindy</artifactId>

        <version>1.0.0-SNAPSHOT</version>

        <packaging>bundle</packaging>

        <name>Camel Blueprint Bindy Test</name>

        <description>Camel Blueprint to test the functionalities of Camel Bindy.</description>

        <licenses>

          <license>

            <name>Apache License, Version 2.0</name>

            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>

            <distribution>repo</distribution>

          </license>

        </licenses>

        <properties>

          <camel.version>2.17.0.redhat-630187</camel.version>

          <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>

          <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

          <jboss.fuse.bom.version>6.3.0.redhat-187</jboss.fuse.bom.version>

          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        </properties>

        <dependencyManagement>

          <dependencies>

            <dependency>

              <groupId>org.jboss.fuse.bom</groupId>

              <artifactId>jboss-fuse-parent</artifactId>

              <version>${jboss.fuse.bom.version}</version>

              <type>pom</type>

              <scope>import</scope>

            </dependency>

          </dependencies>

        </dependencyManagement>

        <dependencies>

          <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-core</artifactId>

          </dependency>

          <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-blueprint</artifactId>

          </dependency>

          <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-bindy</artifactId>

          </dependency>

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-api</artifactId>

          </dependency>

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-log4j12</artifactId>

          </dependency>

          <dependency>

            <groupId>log4j</groupId>

            <artifactId>log4j</artifactId>

          </dependency>

        </dependencies>

        <repositories>

          <repository>

            <releases>

              <enabled>true</enabled>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <enabled>false</enabled>

            </snapshots>

            <id>fuse-public-repository</id>

            <name>FuseSource Community Release Repository</name>

            <url>https://repo.fusesource.com/nexus/content/groups/public</url>

          </repository>

          <repository>

            <releases>

              <enabled>true</enabled>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <enabled>false</enabled>

            </snapshots>

            <id>red-hat-ga-repository</id>

            <name>Red Hat GA Repository</name>

            <url>https://maven.repository.redhat.com/ga</url>

          </repository>

        </repositories>

        <pluginRepositories>

          <pluginRepository>

            <releases>

              <enabled>true</enabled>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <enabled>false</enabled>

            </snapshots>

            <id>fuse-public-repository</id>

            <name>FuseSource Community Release Repository</name>

            <url>https://repo.fusesource.com/nexus/content/groups/public</url>

          </pluginRepository>

          <pluginRepository>

            <releases>

              <enabled>true</enabled>

              <updatePolicy>never</updatePolicy>

            </releases>

            <snapshots>

              <enabled>false</enabled>

            </snapshots>

            <id>red-hat-ga-repository</id>

            <name>Red Hat GA Repository</name>

            <url>https://maven.repository.redhat.com/ga</url>

          </pluginRepository>

        </pluginRepositories>

        <build>

          <defaultGoal>install</defaultGoal>

          <plugins>

            <plugin>

              <groupId>org.apache.felix</groupId>

              <artifactId>maven-bundle-plugin</artifactId>

              <version>${version.maven-bundle-plugin}</version>

              <extensions>true</extensions>

              <configuration>

                <instructions>

                  <Bundle-SymbolicName>testBindy</Bundle-SymbolicName>

                  <Bundle-Name>Example by Coen [testBindy]</Bundle-Name>

                </instructions>

              </configuration>

            </plugin>

            <plugin>

              <artifactId>maven-compiler-plugin</artifactId>

              <version>3.5.1</version>

              <configuration>

                <source>1.8</source>

                <target>1.8</target>

              </configuration>

            </plugin>

            <plugin>

              <artifactId>maven-resources-plugin</artifactId>

              <version>3.0.1</version>

              <configuration>

                <encoding>UTF-8</encoding>

              </configuration>

            </plugin>

            <plugin>

              <groupId>org.apache.camel</groupId>

              <artifactId>camel-maven-plugin</artifactId>

              <version>${camel.version}</version>

              <configuration>

                <useBlueprint>true</useBlueprint>

              </configuration>

            </plugin>

          </plugins>

        </build>

        <groupId>org.demo</groupId>

      </project>

       

      Customers.java

      package org.demo.filebindy;

       

      import org.apache.camel.dataformat.bindy.annotation.CsvRecord;

      import org.apache.camel.dataformat.bindy.annotation.DataField;

       

      @CsvRecord(separator=",")

      public class Customers {

        @DataField(pos=1)

        String companyName;

       

        @DataField(pos=2)

        String companyBrand;

       

        @DataField(pos=3)

        String customerFirstName;

       

        @DataField(pos=4)

        String customerLastName;

       

        @DataField(pos=5)

        String customerEmail;

       

        @DataField(pos=6)

        String customerContract;

       

        @DataField(pos=7)

        String customerInvoice;

       

        @DataField(pos=8)

        String customerAmount;

       

        public String getCompanyName() {

        return companyName;

        }

       

        public void setCompanyName(String companyName) {

        this.companyName = companyName;

        }

       

        public String getCompanyBrand() {

        return companyBrand;

        }

       

        public void setCompanyBrand(String companyBrand) {

        this.companyBrand = companyBrand;

        }

       

        public String getCustomerFirstName() {

        return customerFirstName;

        }

       

        public void setCustomerFirstName(String customerFirstName) {

        this.customerFirstName = customerFirstName;

        }

       

        public String getCustomerLastName() {

        return customerLastName;

        }

       

        public void setCustomerLastName(String customerLastName) {

        this.customerLastName = customerLastName;

        }

       

        public String getCustomerEmail() {

        return customerEmail;

        }

       

        public void setCustomerEmail(String customerEmail) {

        this.customerEmail = customerEmail;

        }

       

        public String getCustomerContract() {

        return customerContract;

        }

       

        public void setCustomerContract(String customerContract) {

        this.customerContract = customerContract;

        }

       

        public String getCustomerInvoice() {

        return customerInvoice;

        }

       

        public void setCustomerInvoice(String customerInvoice) {

        this.customerInvoice = customerInvoice;

        }

       

        public String getCustomerAmount() {

        return customerAmount;

        }

       

        public void setCustomerAmount(String customerAmount) {

        this.customerAmount = customerAmount;

        }

       

        public String toString(){

        return "customerFirstName:" + customerFirstName + " customerLastName:" + customerLastName + " customerEmail:" + customerEmail;

        }

      }