7 Replies Latest reply on May 7, 2014 4:09 PM by Alejandro Arévalo

    JBossFuse:karaf@root> features:addUrl issue

    Dragan Juricic Newbie

      I tried to build and run example but could not do it. When run command:

       

      JBossFuse:karaf@root> features:addUrl mvn:org.fusesource.examples/rider-auto-common/4.0-SNAPSHOT/xml/features

       

      I got the next error:

       

      Error executing command: Unable to add repositories:        

      URL [mvn:org.fusesource.examples/rider-auto-common/4.0-SNAPSHOT/xml/features] could not be resolved.

       

      Please, could you help me tackle this problem?

        • 1. Re: JBossFuse:karaf@root> features:addUrl issue
          Claus Ibsen Master

          Where did you find that information about addUrl?

           

          It does seem like you need to build that example code locally first using maven, before you can use addUrl

          • 2. Re: JBossFuse:karaf@root> features:addUrl issue
            Dragan Juricic Newbie

            Hi,

             

            I tried to run example project (FuseByExample, rider-auto-osgi) according to the steps below. This is the project link: https://github.com/FuseByExample/rider-auto-osgi

             

            My build steps:

             

            1) Build project using maven: $ mvn clean install

            2) Start JBoss Fuse: $ bin/fuse

            3) Add this projects features.xml config to Fuse from the Console

             

            JBossFuse:karaf@root> features:addUrl mvn:org.fusesource.examples/rider-auto-common/4.0-SNAPSHOT/xml/features

             

            Eth., passed fine (1 and 2), but on step 3) I got next error:

             

            Error executing command: Unable to add repositories:       

            URL [mvn:org.fusesource.examples/rider-auto-common/4.0-SNAPSHOT/xml/features] could not be resolved.

             

            Thx.

            • 3. Re: JBossFuse:karaf@root> features:addUrl issue
              Claus Ibsen Master

              What version of JBoss Fuse are you using?

              • 4. Re: JBossFuse:karaf@root> features:addUrl issue
                Dragan Juricic Newbie

                I'm using Fuse 6.0.0.redhat-024.

                • 5. Re: JBossFuse:karaf@root> features:addUrl issue
                  Jonathan Anstey Novice

                  When you build the rider-auto project, it should install that features file to your local .m2 repo (~/.m2/repository) which the container should then be able to read. Maybe increase the logging to see what is happening when it is trying to resolve this file:

                   

                  log:set TRACE org.ops4j.pax.url.mvn

                  • 6. Re: JBossFuse:karaf@root> features:addUrl issue
                    Alejandro Arévalo Newbie

                    Hi,

                     

                    I'm new using JBoss Fuse  and I'm facing the same problem trying to run the same example, but using JBoss Fuse v.6.1.0 and I have followed the recommendation given by Jonathan about changing the log of org.ops4.pax.url.mvn to TRACE, and I have noticed that JBoss Fuse tries to get the repository starting from $JBOSS_FUSE_HOME:

                     

                    09:27:58,929 | TRACE | l Console Thread | Connection| 1 - org.ops4j.pax.url.mvn - 1.3.7 | Downloading [Version [4.0-SNAPSHOT] from URL [file:/Servers/JBossFuse/jboss-fuse-6.1.0.redhat-379/%20/home/developer/.m2/repository/org/fusesource/examples/rider-auto-common/4.0-SNAPSHOT/rider-auto-common-4.0-SNAPSHOT-features.xml]]

                    09:27:58,929 | DEBUG | l Console Thread | Connection| 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Could not download [Version [4.0-SNAPSHOT] from URL [file:/Servers/JBossFuse/jboss-fuse-6.1.0.redhat-379/%20/home/developer/.m2/repository/org/fusesource/examples/rider-auto-common/4.0-SNAPSHOT/rider-auto-common-4.0-SNAPSHOT-features.xml]]

                    09:27:58,929 | TRACE | l Console Thread | Connection| 1 - org.ops4j.pax.url.mvn - 1.3.7 |   Reason [java.io.FileNotFoundException: /Servers/JBossFuse/jboss-fuse-6.1.0.redhat-379/ /home/developer/.m2/repository/org/fusesource/examples/rider-auto-common/4.0-SNAPSHOT/rider-auto-common-4.0-SNAPSHOT-features.xml (No such file or directory)]

                    09:27:58,929 | INFO  | l Console Thread | Console| 17 - org.apache.karaf.shell.console - 2.3.0.redhat-610379 | Exception caught while executing command

                    org.apache.karaf.shell.console.MultiException: Unable to add repositories:

                      URL [mvn:org.fusesource.examples/rider-auto-common/4.0-SNAPSHOT/xml/features] could not be resolved.

                     

                    I don't know why it tries to find the the repository starting from "/Servers/JBossFuse/jboss-fuse-6.1.0.redhat-379/".

                     

                    Please I really would appreciate anyone's help, or if you have found the solution, please share it

                     

                    Thanks in advance

                    • 7. Re: JBossFuse:karaf@root> features:addUrl issue
                      Alejandro Arévalo Newbie

                      I have found in the file JBOSS_FUSE_HOME/etc/org.ops4j.pax.url.mvn.cfg the property org.ops4j.pax.url.mvn.localRepository, I uncommented the line and specified explicitly the location of my maven repository:

                       

                      org.ops4j.pax.url.mvn.localRepository=/home/developer/.m2/repository

                       

                      With this change, I restarted JBoss Fuse, and then I was able to run the command without problem.

                       

                      Hope it helps.

                       

                      Regards