0 Replies Latest reply on Oct 20, 2014 11:47 AM by Rajiv Konkimalla

    Error deploying Camel project in JBoss Fuse 6.1

    Rajiv Konkimalla Newbie

      I created a simple Camel project that runs fine. However, the following error is shown when tried to deploy in JBoss Fuse 6.1 via JBoss Developer Studio. I am also giving the  contents of camel-context.sml and pom.xml. Please let me know if I am missing something in pom.xml file.

       

      FAILED to install into OSGi: fab:mvn:com.a2z/appjmsserver/1.0.0-SNAPSHOT

      Start of bundle with id 322 failed with message: Unresolved constraint in bundle com.a2z.appjmsserver [322]: Unable to resolve 322.0: missing requirement [322.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.11.0.redhat-60024))

      java.io.IOException: Start of bundle with id 322 failed with message: Unresolved constraint in bundle com.a2z.appjmsserver [322]: Unable to resolve 322.0: missing requirement [322.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.11.0.redhat-60024))

          at org.apache.aries.jmx.framework.Framework.startBundle(Framework.java:461)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)

          at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)

          at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)

          at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)

          at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)

          at javax.management.StandardMBean.invoke(StandardMBean.java:405)

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

          at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)

          at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)

          at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)

          at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)

          at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)

          at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

          at sun.rmi.transport.Transport$1.run(Transport.java:177)

          at sun.rmi.transport.Transport$1.run(Transport.java:174)

          at java.security.AccessController.doPrivileged(Native Method)

          at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.a2z.appjmsserver [322]: Unable to resolve 322.0: missing requirement [322.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.11.0.redhat-60024))

          at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4225)

          at org.apache.felix.framework.Felix.startBundle(Felix.java:2063)

          at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)

          at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)

          at org.apache.aries.jmx.framework.Framework.startBundle(Framework.java:459)

          ... 36 more

       

       

      ----camel-context.xml file --------------------------------------------------------------------------------------------------------------

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

      <!-- Configures the Camel Context-->

       

      <beans xmlns="http://www.springframework.org/schema/beans"

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

             xmlns:amq="http://activemq.apache.org/schema/core"

             xsi:schemaLocation="

             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

             http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd

             http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

       

        <!-- This creates an embedded ActiveMQ Broker -->

        <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" persistent="false">

          <transportConnectors>

            <transportConnector uri="tcp://localhost:61616" />

          </transportConnectors>

        </broker>

       

        <!-- Lets connect the Camel ActiveMQ component to the embedded broker.

             See http://camel.apache.org/activemq.html for more information.

        -->

        <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">

          <property name="brokerURL" value="failover:tcp://localhost:61616"/>

        </bean>

       

        <camelContext trace="false" xmlns="http://camel.apache.org/schema/spring">

          <route>

              <from uri="file:C:/delete/appjmsapp?noop=true"/>

              <to uri="activemq:appjmsappJobs"/>

              <convertBodyTo type="String"/>

              <to uri="mina2:tcp://localhost:9991?sync=true&amp;timeout=600000"/>

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

          </route>

      </camelContext>

       

      </beans>

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

       

      -------------pom.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>com.a2z</groupId>

        <artifactId>appjmsserver</artifactId>

        <packaging>jar</packaging>

        <version>1.0.0-SNAPSHOT</version>

       

        <name>ActiveMQ embedded with Camel</name>

        <url>http://www.myorganization.org</url>

       

        <properties>

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

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

        </properties>

       

        <repositories>

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

          <repository>

           <id>ea.fusesource.org</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>  

          <repository>

            <id>snapshot.fusesource.org</id>

            <name>FuseSource Snapshot Repository</name>

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

            <snapshots>

              <enabled>true</enabled>

            </snapshots>

            <releases>

              <enabled>false</enabled>

            </releases>

          </repository>

        </repositories>

       

        <pluginRepositories>

          <pluginRepository>

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

          </pluginRepository>

          <pluginRepository>

           <id>ea.fusesource.org</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>    

          <pluginRepository>

            <id>snapshot.fusesource.org</id>

            <name>FuseSource Snapshot Repository</name>

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

            <snapshots>

              <enabled>true</enabled>

            </snapshots>

            <releases>

              <enabled>false</enabled>

            </releases>

          </pluginRepository>

        </pluginRepositories>

       

        <dependencies>

          <dependency>

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

            <artifactId>camel-core</artifactId>

            <version>2.12.0.redhat-610379</version>

          </dependency>

          <dependency>

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

            <artifactId>camel-jms</artifactId>

            <version>2.12.0.redhat-610379</version>

          </dependency>

          <dependency>

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

            <artifactId>camel-spring</artifactId>

            <version>2.12.0.redhat-610379</version>

          </dependency>

          <dependency>

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

             <artifactId>camel-mina2</artifactId>

             <version>2.12.0.redhat-610379</version>

          </dependency>

       

          <!-- the ActiveMQ client with connection pooling -->

          <dependency>

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

            <artifactId>activemq-client</artifactId>

            <version>5.9.0</version>

          </dependency>

          <dependency>

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

            <artifactId>activemq-camel</artifactId>

            <version>5.9.0</version>

          </dependency>

          <dependency>

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

            <artifactId>activemq-pool</artifactId>

            <version>5.9.0</version>

          </dependency>

       

          <!-- the ActiveMQ broker is optional and can be removed if connecting to a remote broker only -->

          <dependency>

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

            <artifactId>activemq-broker</artifactId>

            <version>5.9.0</version>

          </dependency>

          <dependency>

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

            <artifactId>activemq-spring</artifactId>

            <version>5.9.0</version>

          </dependency>

          <dependency>

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

            <artifactId>activemq-kahadb-store</artifactId>

            <version>5.9.0</version>

          </dependency>

          <dependency>

            <groupId>org.apache.xbean</groupId>

            <artifactId>xbean-spring</artifactId>

            <version>3.15</version>

          </dependency>

          <dependency>

            <groupId>org.springframework</groupId>

            <artifactId>spring-context</artifactId>

            <version>3.2.8.RELEASE</version>

          </dependency>

       

          <!-- logging -->

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-api</artifactId>

            <version>1.7.5</version>

          </dependency>

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-log4j12</artifactId>

            <version>1.7.5</version>

          </dependency>

          <dependency>

            <groupId>log4j</groupId>

            <artifactId>log4j</artifactId>

            <version>1.2.17</version>

          </dependency>

       

          <!-- testing -->

          <dependency>

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

            <artifactId>camel-test-spring</artifactId>

            <version>2.12.0.redhat-610379</version>

            <scope>test</scope>

          </dependency>

        </dependencies>

       

        <build>

          <defaultGoal>install</defaultGoal>

       

          <plugins>

            <plugin>

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

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

              <version>2.5.1</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>

              <configuration>

                <encoding>UTF-8</encoding>

              </configuration>

            </plugin>

       

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

            <plugin>

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

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

              <version>2.12.0.redhat-610379</version>

            </plugin>

          </plugins>

        </build>

       

      </project>

       

      --------------------------------------------------------------------------------------------------------------------------------------------------------------------