4 Replies Latest reply on Feb 2, 2012 10:33 PM by nigelgay

    features:listRepositories is blank after clean install?

    nigelgay

      Hi,

       

      I'm trying to do an initial PoC with plugging web services the FUSE ESB and unfortunately struggling to even get the examples to work.  I was getting a problem with lots of "Content not allowed in prolog" errors when I run servicemix.bat, finally got this solved by editing the etc/org.ops4j.pax.url.mvn.cfg file to specify the location of my maven settings file, so this line now says

       

      org.ops4j.pax.url.mvn.settings=file:W:\maven\settings.xml

       

      Now I can at least start up the ESB without any error messages.  Besides editing that one line in the config file, its a clean install straight from the Windows zip.

       

      Yet, even with this done, I can't install the simplest example.  If I try "features:install examples-cxf-osgi", tells me no feature with that name available.  If I do "features:list", it says "No features available".  If I do "features:listRepositories", it says "No repositories available" - I guess that's the root of all the other issues.

       

      Why would there be no repositories available?  I can see all the default repositories listed in etc/org.apache.karaf.features.cfg, why would it be ignoring these properties values?

       

      If anyone has any suggestions would be much appreciated!

       

      This is with the latest version, apache-servicemix-4.4.1-fuse-01-13.

       

      Many thanks,

      Nigel Gay.

        • 1. Re: features:listRepositories is blank after clean install?
          ffang

          Hi,

           

          This error seems caused by can't find org.ops4j.pax.url.mvn.defaultRepositories which by default is $FUSE_ESB/system folder, did you change org.ops4j.pax.url.mvn.defaultRepositories in $FUSE_ESB/org.ops4j.pax.url.mvn.cfg?

           

          Also does your machine has internet connection?

           

          Also after you start FUSE ESB, could you post the output of "osgi:list", this can give more hint about if your FUSE ESB get started correctly. And did you see any exception in $FUSE_ESB/data/log/servicemix.log?

           

          Freeman

          • 2. Re: features:listRepositories is blank after clean install?
            nigelgay

            Freeman,

             

            I hadn't changed that value, do I need to?  So I tried:

             

            1) Fresh install

            2) Set org.ops4j.pax.url.mvn.settings=file:W:\maven\settings.xml in org.ops4j.pax.url.mvn.cfg (just because my Maven settings file isn't in the default location)

            3) Run servicemix.bat - no errors on the console

             

            karaf@root> features:listRepositories

            No repositories available.

            karaf@root> osgi:list

            START LEVEL 100 , List Threshold: 50

               ID   State         Blueprint      Level  Name

            karaf@root>

             

            So no repositories available, and no bundles available.

             

            I logged in servicemix.log and found it was complaining that it couldn't find W:mavensettings.xml, so obviously it doesn't like the \s, so I tried file:W:/Maven/settings.xml and W:/Maven/settings.xml, tried also specifying org.ops4j.pax.url.mvn.localRepository=W:/Maven/Repository (in case it didn't like that in my settings.xml this is listed as W:\Maven\Repository) and any of these I try do eliminate the errors from servicemix.log - but I still have no repositories, and an empty osgi:list.

             

            Can anyone confirm what the right format for these values should be? e.g. do I need the file: prefix or not, do I use / or \ \ .  Anything else I need to change if my maven settings and repository aren't in the default C:\Users\\.m2 location?

             

            Many thanks!

            Nigel.

             

            Edited by: nigelgay on Feb 2, 2012 12:46 PM

            • 3. Re: features:listRepositories is blank after clean install?
              ffang

              Hi,

              No, you needn't change org.ops4j.pax.url.mvn.defaultRepositories, the root cause is can't load org.ops4j.pax.url.mvn.settings property, so FUSE ESB didn't started correctly at all.

               

              Could you try with

              org.ops4j.pax.url.mvn.settings=file:///W:/Maven/settings.xml

               

              Take a look at to get more details about how windows file URI looks like.

              http://en.wikipedia.org/wiki/File_URI_scheme

               

              Freeman

               

              Edited by: ffang on Feb 3, 2012 12:55 AM

              • 4. Re: features:listRepositories is blank after clean install?
                nigelgay

                Freeman,

                 

                Ah, I have it working, seems there was two problems.  I did a fresh install, then saw an error message in the log that I hadn't seen before, basically complaining that the repository path (to \system) had a space in it, because I'd installed it into C:\Program Files\Java\apache-servicemix-4.4.1-fuse-01-13.  That seems odd, I'd have thought something under C:\Program Files would be the logical place anybody would put it, so don't lots of people run into that issue?

                 

                Once I deleted everything again, unzipped a fresh install into C:\apache-servicemix-4.4.1-fuse-01-13, altered the config file to specify the location of my maven settings file, and fired it up, it worked.

                 

                Btw, now I had it working I tested around a bit, it doesn't seem to matter whether you put any of the following, they all seem to work:

                org.ops4j.pax.url.mvn.settings=W:/Maven/settings.xml

                org.ops4j.pax.url.mvn.settings=file:W:/Maven/settings.xml

                org.ops4j.pax.url.mvn.settings=file:///W:/Maven/settings.xml

                 

                Many thanks for your help,

                Nigel.

                 

                Edited by: nigelgay on Feb 3, 2012 3:33 AM