2 Replies Latest reply on Jul 26, 2013 3:32 AM by Freeman(Yue) Fang

    Fuse Fabric deployment error | java.lang.Exception: Can not resolve feature

    pramod p Newbie

      i am trying to deploy to Fuse Fabric. The application is built using Spring, Camel, CXF, WS-security, drools and Guvnor.

      i was able to deploy the application to Karaf container, but when i deploy the same in Fabric using the FAB deployment. it is throwing the below error stack.

       

      java.lang.Exception: Can not resolve feature:
       Unsatisfied requirement(s):
      ---------------------------
         package:(&(package=org.ops4j.pax.exam.options)(version>=1.2.0)(!(version>=2.0.0)))
            Apache Aries Unit Test Support
         package:(&(package=org.apache.aries.mocks)(version>=0.3.0))
            com.eissDemo.ServiceV2
         package:(&(package=org.ops4j.pax.exam)(version>=1.2.0)(!(version>=2.0.0)))
            Apache Aries Unit Test Support
         package:(&(package=javax.xml.namespace)(version>=5.0.0.2)(version<=5.0.0.2))
            com.eissDemo.ServiceV2
         package:(&(package=org.apache.aries.unittest.fixture)(version>=0.4.0))
            com.eissDemo.ServiceV2
         package:(&(package=org.apache.aries.unittest.mocks.annotations)(version>=0.3.0))
            com.eissDemo.ServiceV2
         package:(&(package=org.apache.aries.itest)(version>=0.4.0))
            com.eissDemo.ServiceV2
         package:(&(package=javax.xml.soap)(version>=5.0.0.2)(version<=5.0.0.2))
            com.eissDemo.ServiceV2
         package:(&(package=org.junit))
            Apache Aries Unit Test Support
         package:(&(package=org.apache.aries.unittest.mocks)(version>=0.3.0))
            com.eissDemo.ServiceV2
         package:(&(package=org.apache.aries.unittest.junit)(version>=0.3.0))
            com.eissDemo.ServiceV2
         package:(&(package=javax.persistence)(version>=5.0.0.2)(version<=5.0.0.2))
            com.eissDemo.ServiceV2
         package:(&(package=junit.framework))
            Apache Aries Unit Test Support
         package:(&(package=org.objectweb.asm)(version>=3.3.1)(version<=3.3.1))
            com.eissDemo.ServiceV2
      

       

      Firstly, The above error is asking me to include the Junit and mock related frameworks in the Fabric container, which is not required!? these frameworks are added with the "test" scope in the maven.

       

      Secondly, the dependency "aries" is not being used in the project directly. It is used by the camel-cxf framework. But still it is asking the "aries" jars to be mentioned in the dependency. The FAB deployment should take care of these 3rd party dependencies or it defeats the purpose of using it!!

       

      Third, the soap and namespace dependency are present in the maven dependency with the request version. still it is complaining!

       

      Fourth, For the persistence, soap and namespace   fabric is asking the "5.0.0.2" dependency, which does not exist!!!

       

      i have the following features installed in the fabric

       

      cxf
      camel-xstream
      camel-jaxb
      camel-spring
      camel-jms
      camel-blueprint
      spring
      camel-core
      fabric-camel
      camel-spring-javaconfig
      war
      

       

      and the following maven features URLS

       

      mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.6.0.redhat-60024/xml/features
      mvn:org.apache.cxf.karaf/apache-cxf/2.6.0.redhat-60024/xml/features
      mvn:org.jboss.fuse/jboss-fuse/6.0.0.redhat-024/xml/features
      mvn:org.apache.camel.karaf/apache-camel/2.10.0.redhat-60024/xml/features
      

       

      and the application is used as the fab

       

      mvn:com.xxxx/ServiceV2/1.0.0-SNAPSHOT
      

       

      can anyone tell me if i am using enough features or i need more, if so what all needs to be included? why do i need to include the testing frameworks in the fabric? or how do i avoid them being deployed in the fuse fabric?

       

       

      Thanks in advance

      -Regards,

      Pramod

        • 1. Re: Fuse Fabric deployment error | java.lang.Exception: Can not resolve feature
          pramod p Newbie

          Hi All,

           

          Our issue was resolved. Thanks to Ulhas Bhole support.

          just for the community benefit i am posting the solution.

           

           

          The Jboss support team suggested us to use the OSGI instead of going for the FAB deployment, because the way FAB deployment was trying to resolve the dependency was the cause of the issue. It was trying to dowload inter dependencies which lead to additional dependencies which was not required.

           

          We have learnt it the hard way . Since FAB is new, its better to stick with the OSGI as of now. will be looking forward for the FAB deployment in the next release.

          Until then, here is the pom.xml dependency with the OSGI configuration for the projects which has the follwing frameworks

          • Spring
          • Drools
          • Guvnor
          • WS-security
          • camel
          • CXF
          • Jersey[Rest calls]

           

           

          --------------------The POM---------------

           

          <?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>

                    <version>1.0.0-SNAPSHOT</version>

                    <groupId>com.sapient</groupId>

                    <artifactId>ServiceV2</artifactId>

                    <name>EISS team</name>

                    <description>Thanks to Jboss team</description>

                    <packaging>bundle</packaging>

                    <dependencies>

                              <!-- Neo4j integration dependency jars -->

                        <dependency>

                                        <groupId>com.sun.jersey</groupId>

                                        <artifactId>jersey-client</artifactId>

                                        <version>1.17</version>

                              </dependency>

                              <dependency>

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

                                        <artifactId>camel-core</artifactId>

                                        <version>2.10.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                              <dependency>

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

                                        <artifactId>camel-jms</artifactId>

                                        <version>2.10.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                              <dependency>

                                        <groupId>org.apache.activemq</groupId>

                                        <artifactId>activemq-camel</artifactId>

                                        <version>5.7.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                              <dependency>

                                        <groupId>org.apache.activemq</groupId>

                                        <artifactId>activemq-pool</artifactId>

                                        <version>5.7.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                              <dependency>

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

                                        <artifactId>camel-cxf</artifactId>

                                        <version>2.10.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                              <dependency>

                                        <groupId>org.apache.cxf</groupId>

                                        <artifactId>cxf-rt-ws-security</artifactId>

                                        <version>2.6.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                              <dependency>

                                        <groupId>org.apache.cxf</groupId>

                                        <artifactId>cxf-rt-transports-http-jetty</artifactId>

                                        <version>2.6.0.fuse-71-047</version>

                      <scope>provided</scope>

                              </dependency>

                  <dependency>

                                        <groupId>org.apache.servicemix.bundles</groupId>

                                        <artifactId>org.apache.servicemix.bundles.drools</artifactId>

                                        <version>5.5.0.Final_1</version>

                  </dependency>

                    </dependencies>

                    <!-- This repository is for the jbpm and drools dependencies -->

                    <repositories>

                              <!-- This repository is for the Maven2 - secondary -->

                              <repository>

                                        <id>maven2-2</id>

                                        <name>maven2 Release Repository</name>

                                        <url>http://repo1.maven.org/maven2</url>

                                        <snapshots>

                                                  <enabled>true</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </repository>

                              <repository>

                                        <id>jboss-public-repository-group</id>

                                        <name>JBoss Public Maven Repository Group</name>

                                        <url>https://repository.jboss.org/nexus/content/groups/public/</url>

                                        <layout>default</layout>

                                        <releases>

                                                  <enabled>true</enabled>

                                                  <updatePolicy>never</updatePolicy>

                                        </releases>

                                        <snapshots>

                                                  <enabled>false</enabled>

                                                  <updatePolicy>never</updatePolicy>

                                        </snapshots>

                              </repository>

                              <repository>

                                        <id>fusesource</id>

                                        <name>FuseSource Release Repository</name>

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

                                        <snapshots>

                                                  <enabled>false</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </repository>

                              <!-- This repository is for the camel dependencies -->

                              <repository>

                                        <id>release.fusesource.org</id>

                                        <name>FuseSource Release Repository</name>

                                        <url>http://repo.fusesource.com/nexus/content/repositories/releases</url>

                                        <snapshots>

                                                  <enabled>false</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </repository>

                              <!-- This repository is for the camel dependencies - repo2 -->

                              <repository>

                                        <id>fusesource.ea</id>

                                        <name>FuseSource Community Early Access Release Repository</name>

                                        <url>http://repo.fusesource.com/nexus/content/groups/ea</url>

                                        <snapshots>

                                                  <enabled>false</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </repository>

                              <!-- This repository is for the Maven2 -->

                              <repository>

                                        <id>maven2</id>

                                        <name>maven2 Release Repository</name>

                                        <url>http://download.java.net/maven/2</url>

                                        <snapshots>

                                                  <enabled>false</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </repository>

                    </repositories>

                    <pluginRepositories>

                              <pluginRepository>

                                        <id>fusesource</id>

                                        <name>FuseSource Release Repository</name>

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

                                        <snapshots>

                                                  <enabled>false</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </pluginRepository>

                              <pluginRepository>

                                        <id>fusesource.ea</id>

                                        <name>FuseSource Community Early Access Release Repository</name>

                                        <url>http://repo.fusesource.com/nexus/content/groups/ea</url>

                                        <snapshots>

                                                  <enabled>false</enabled>

                                        </snapshots>

                                        <releases>

                                                  <enabled>true</enabled>

                                        </releases>

                              </pluginRepository>

                    </pluginRepositories>

                    <build>

                              <plugins>

                                        <!--maven plugin to skip the test -->

                                        <plugin>

                                                  <groupId>org.apache.maven.plugins</groupId>

                                                  <artifactId>maven-surefire-plugin</artifactId>

                                                  <version>2.15</version>

                                                  <configuration>

                                                            <skipTests>true</skipTests>

                                                  </configuration>

                                        </plugin>

                                        <plugin>

                                                  <groupId>org.apache.maven.plugins</groupId>

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

                                                  <version>2.3.2</version>

                                                  <configuration>

                                                            <source>1.6</source>

                                                            <target>1.6</target>

                                                  </configuration>

                                        </plugin>

                                        <plugin>

                                                  <groupId>org.apache.maven.plugins</groupId>

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

                                                  <version>2.6</version>

                                        </plugin>

                                        <!-- allows the route to be ran via 'mvn camel:run' -->

                                        <plugin>

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

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

                                                  <version>2.10.0.fuse-71-047</version>

                                        </plugin>

                      <plugin>

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

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

                           <extensions>true</extensions>

                           <configuration>

                             <instructions>

                               <Import-Package>

                                   org.apache.cxf.*,

                                   org.apache.camel.*,

                                   org.apache.activemq.*,

                                   org.drools,

                                   *

                               </Import-Package>

                               <Export-Package>com.eissDemo</Export-Package>

                               <DynamicImport-Package>*</DynamicImport-Package>

                             </instructions>

                           </configuration>

                      </plugin>

                              </plugins>

                    </build>

                    <properties>

                              <jbpm.version>5.4.0.Final</jbpm.version>

                              <drools.version>5.4.0.Final</drools.version>

                    </properties>

          </project>

           

           

          regards,

          Pramod

          • 2. Re: Fuse Fabric deployment error | java.lang.Exception: Can not resolve feature
            Freeman(Yue) Fang Master

            Hi,

             

            Thanks for sharing your solution!

             

            Freeman