6 Replies Latest reply on May 6, 2014 3:56 AM by ffang

    camel project deploy problem

    longsha1223

      Hi ,

      When I deploy Camel project into fabric , I have exception message from my web GUI as below ,

      How can I do to resolve this exception ?

      Thanks ,

      Best Regards.


      Provision Exception:

      • org.osgi.service.resolver.ResolutionException: Unable to resolve dummy/0.0.0: missing requirement [dummy/0.0.0] osgi.identity; osgi.identity=com.neotest.camel-amq; type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]" [caused by: Unable to resolve com.neotest.camel-amq/1.0.0.SNAPSHOT: missing requirement [com.neotest.camel-amq/1.0.0.SNAPSHOT] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.springframework.jdbc.datasource)(version>=3.0.0)(!(version>=4.0.0)))"]
      •   at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)
      •   at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)
      •   at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148)
      •   at io.fabric8.agent.DeploymentBuilder.resolve(DeploymentBuilder.java:226)
      •   at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:521)
      •   at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:252)
      •   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      •   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      •   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:744)
        • 1. Re: camel project deploy problem
          ffang

          Hi,

           

          You need install spring-jdbc feature in that fabric container which can provide org.springframework.jdbc.datasource package.

           

          Freeman

          • 2. Re: camel project deploy problem
            longsha1223

            Hi ,

            I have do some command as below :

            osgi:install -s mvn:org/springframework/spring-jdbc/4.0.3.RELEASE

            but I got some exception :

            Bundle IDs:

            Error executing command: Error installing bundles:

              Unable to install bundle mvn:org/springframework/spring-jdbc/4.0.3.RELEASE

             

            And I do another install command  :

            osgi:install file:/home/neo/.m2/repository/org/springframework/spring-jdbc/4.0.3.RELEASE/spring-jdbc-4.0.3.RELEASE.jar

            it is work !! But the deployed bean still have same exception when start.

             

            What can I do for this ???

             

             

            another qustion :

            if I put mvn: before my url , it means it will to get jar from maven's repository or not ?

             

            Thanks ,

            Best Regards.

            • 3. Re: camel project deploy problem
              ffang

              Hi,

               

              The error

              osgi.wiring.package=org.springframework.jdbc.datasource)(version>=3.0.0)(!(version>=4.0.0))

              means you need install spring-jdbc version 3.x

              so please use

              features:install spring-jdbc (which will install spring-jdbc 3.2.8 for JBoss FUSE 6.1)

               

              And for your another question

              using mvn: will search the artifacts from maven repo, (both local and remote), you can find the pre-defined maven repo from etc/org.ops4j.pax.url.mvn.cfg

               

              Freeman

              • 4. Re: camel project deploy problem
                davsclaus

                You should install spring-jdbc using a feature

                 

                features:install spring-jdbc

                 

                And the correct spring bundle(s) is installed for you.

                1 of 1 people found this helpful
                • 5. Re: camel project deploy problem
                  longsha1223

                  Hi ,

                  When I use the command :  features:install spring-jdbc , it occurs error message as below :

                  Error executing command: The container is managed by fabric, please use fabric:profile-edit --features spring-jdbc/0.0.0 target-profile instead. See fabric:profile-edit --help for more information.

                   

                  When I use the command :

                  fabric:profile-edit --features spring-jdbc/3.2.8 NeoDemo

                  It's work

                  But when I start my bean that I deployed , I got the exception message as below :

                  org.osgi.service.resolver.ResolutionException: Unable to resolve dummy/0.0.0: missing requirement [dummy/0.0.0] osgi.identity; osgi.identity=spring-jdbc; type=karaf.feature; version=3.2.8

                   

                  What can i do ??

                   

                  The difference between features:install spring-jdbc and fabric:profile-edit --features is ??

                   

                  Thanks ,

                  Best Regards.

                  • 6. Re: camel project deploy problem
                    ffang

                    Hi,

                     

                    The exact spring version is 3.2.8.RELEASE_1, so please use 3.2.8.RELEASE_1 instead of 3.2.8 when you use

                    fabric:profile-edit --features

                     

                    And about the question

                    The difference between features:install spring-jdbc and fabric:profile-edit --features is ??

                     

                    Normally features:install is used in standalone fuse container, if the container is managed by fabric, you should add that feature to the fabric profile.

                     

                    Freeman