3 Replies Latest reply on Aug 23, 2010 11:28 AM by pchandler

    Error,  features:install camel-ibatis

    pchandler

      Tried to install feature camel-ibatis and got:

       

      Error in console:

      URL [mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oscache/2.4_3] could not be resolved. 
      

       

      Error in log:

      14:27:13,611 | ERROR | l Console Thread | FeaturesServiceImpl              | res.internal.FeaturesServiceImpl  480 | URL [mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oscache/2.4_3] could not be resolved.
      

       

      My Config:

      karaf@root> config:list
      ----------------------------------------------------------------
      Pid:            org.apache.servicemix.transaction
      BundleLocation: null
      Properties:
         service.pid = org.apache.servicemix.transaction
         transactionLogDir = /export/home/hostname/1/pchandler/programs/apache-servicemix-4.2.0-fuse-02-00/data/txlog/
         defaultTransactionTimeoutSeconds = 600
         felix.fileinstall.filename = org.apache.servicemix.transaction.cfg
      ----------------------------------------------------------------
      Pid:            org.apache.servicemix.jbi
      BundleLocation: mvn:org.apache.servicemix/servicemix-common/2010.01.0-fuse-02-00
      Properties:
         keepAliveTime = 60000
         maximumPoolSize = -1
         corePoolSize = 4
         allowCoreThreadTimeout = true
         service.pid = org.apache.servicemix.jbi
         shutdownTimeout = 0
         felix.fileinstall.filename = org.apache.servicemix.jbi.cfg
         queueSize = 1024
      ----------------------------------------------------------------
      Pid:            org.apache.felix.fileinstall.d965888d-3c5d-445f-9a2f-7bc4b885fc0a
      FactoryPid:     org.apache.felix.fileinstall
      BundleLocation: mvn:org.apache.felix/org.apache.felix.fileinstall/3.0.0
      Properties:
         felix.fileinstall.poll = 1000
         service.pid = org.apache.felix.fileinstall.d965888d-3c5d-445f-9a2f-7bc4b885fc0a
         felix.fileinstall.dir = /export/home/hostname/1/pchandler/programs/apache-servicemix-4.2.0-fuse-02-00/deploy
         service.factoryPid = org.apache.felix.fileinstall
         felix.fileinstall.filename = org.apache.felix.fileinstall-deploy.cfg
         felix.fileinstall.tmpdir = /export/home/hostname/1/pchandler/programs/apache-servicemix-4.2.0-fuse-02-00/data/generated-bundles----------------------------------------------------------------
      Pid:            org.apache.felix.karaf.log
      BundleLocation: null
      Properties:
         service.pid = org.apache.felix.karaf.log
         size = 500
         felix.fileinstall.filename = org.apache.felix.karaf.log.cfg
         pattern = %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
      ----------------------------------------------------------------
      Pid:            org.apache.felix.karaf.features
      BundleLocation: null
      Properties:
         service.pid = org.apache.felix.karaf.features
         featuresBoot = activemq,activemq-broker,camel,jbi-cluster,web,servicemix-cxf-bc,servicemix-file,servicemix-ftp,servicemix-http,servicemix-jms,servicemix-mail,servicemix-bean,servicemix-camel,servicemix-cxf-se,servicemix-drools,servicemix-eip,servicemix-osworkflow,servicemix-quartz,servicemix-scripting,servicemix-validation,servicemix-saxon,servicemix-wsn2005,camel-cxf,camel-jms   felix.fileinstall.filename = org.apache.felix.karaf.features.cfg
         featuresRepositories = mvn:org.apache.felix.karaf/apache-felix-karaf/1.4.0-fuse-02-00/xml/features,mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.2.0-fuse-02-00/xml/features,mvn:org.apache.servicemix/apache-servicemix/4.2.0-fuse-02-00/xml/features,mvn:org.apache.camel.karaf/apache-camel/2.2.0-fuse-02-00/xml/features,mvn:org.apache.ode/ode-jbi-karaf/1.3.3-fuse-02-00/xml/features
      ----------------------------------------------------------------
      Pid:            org.apache.felix.karaf.management
      BundleLocation: null
      Properties:
         threaded = true
         serviceUrl = service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
         service.pid = org.apache.felix.karaf.management
         objectName = connector:name=rmi
         jmxRealm = karaf
         daemon = true
         felix.fileinstall.filename = org.apache.felix.karaf.management.cfg
         rmiRegistryPort = 1099
      ----------------------------------------------------------------
      Pid:            org.apache.felix.karaf.shell
      BundleLocation: null
      Properties:
         service.pid = org.apache.felix.karaf.shell
         sshPort = 8101
         hostKey = /export/home/hostname/1/pchandler/programs/apache-servicemix-4.2.0-fuse-02-00/etc/host.key
         sshRealm = karaf
         sshHost = 0.0.0.0
         felix.fileinstall.filename = org.apache.felix.karaf.shell.cfg
      ----------------------------------------------------------------
      Pid:            org.ops4j.pax.logging
      BundleLocation: mvn:org.ops4j.pax.logging/pax-logging-service/1.5.0
      Properties:
         log4j.appender.out.layout.ConversionPattern = %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
         felix.fileinstall.filename = org.ops4j.pax.logging.cfg
         service.pid = org.ops4j.pax.logging
         log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
         log4j.appender.out.layout = org.apache.log4j.PatternLayout
         log4j.rootLogger = debug, out, osgi:VmLogAppender
         log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
         log4j.appender.out.file = /export/home/hostname/1/pchandler/programs/apache-servicemix-4.2.0-fuse-02-00/data/log/servicemix_peter.log
         log4j.appender.stdout = org.apache.log4j.ConsoleAppender
         log4j.appender.out.append = true
         log4j.appender.out = org.apache.log4j.FileAppender
      ----------------------------------------------------------------
      Pid:            org.ops4j.pax.web
      BundleLocation: mvn:org.ops4j.pax.web/pax-web-runtime/0.7.2
      Properties:
         org.apache.felix.karaf.features.configKey = org.ops4j.pax.web
         service.pid = org.ops4j.pax.web
         org.osgi.service.http.port = 8181
      ----------------------------------------------------------------
      Pid:            org.ops4j.pax.url.mvn
      BundleLocation: mvn:org.ops4j.pax.url/pax-url-mvn/1.1.2
      Properties:
         service.pid = org.ops4j.pax.url.mvn
         org.ops4j.pax.url.mvn.defaultRepositories = file:/export/home/hostname/1/pchandler/programs/apache-servicemix-4.2.0-fuse-02-00/system@snapshots
         felix.fileinstall.filename = org.ops4j.pax.url.mvn.cfg
         org.ops4j.pax.url.mvn.repositories = http://repo1.maven.org/maven2, http://repo.fusesource.com/maven2, http://repo.fusesource.com/maven2-snapshot@snapshots@noreleases, http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases, http://repository.ops4j.org/maven2, http://svn.apache.org/repos/asf/servicemix/m2-repo, http://repository.springsource.com/maven/bundles/release, http://repository.springsource.com/maven/bundles/external
      

       

        • 1. Re: Error,  features:install camel-ibatis
          ffang

          Hi,

           

          Your machine need have internet access, so that could download the artifacts from maven repo.

           

          Freeman

          • 2. Re: Error,  features:install camel-ibatis
            njiang

            Fuse ESB didn't ship the bundle which the camel-ibatis uses, if you install this feature, the ESB will check your mvn local repository, if it can't find the artifacts, it will try to download from the maven central repository like the maven does.

             

            So you need to make sure your box can access the maven central repository.

             

            Willem

            • 3. Re: Error,  features:install camel-ibatis
              pchandler

              Thanks. It's a internet proxy issue (my issue).

               

              Steps to correct:

               

              1. In org.ops4j.pax.url.mvn.cfg make sure you can access your settings.xml

              #
              # Path to the local maven settings file.
              # The repositories defined in this file will be automatically added to the list
              # of default repositories if the 'org.ops4j.pax.url.mvn.repositories' property
              # below is not set.
              # The following locations are checked for the existence of the settings.xml file
              #   * 1. looks for the specified url
              #   * 2. if not found looks for ${user.home}/.m2/settings.xml
              #   * 3. if not found looks for ${maven.home}/conf/settings.xml
              #   * 4. if not found looks for ${M2_HOME}/conf/settings.xml
              #
              

               

              2. Add the location of the proxy server to your setting.xml

              <settings>
                .
                .
                <proxies>
                 <proxy>
                    <active>true</active>
                    <protocol>http</protocol>
                    <host>proxy.somewhere.com</host>
                    <port>8080</port>
                    <username>proxyuser</username>
                    <password>somepassword</password>
                    <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
                  </proxy>
                </proxies>
                .
                .
              </settings>
              

               

               

              Option 2: Use repositories defined in your settings.xml (no proxy defined).

               

              I figured-out that if you comment-out the repositories defined in org.ops4j.pax.url.mvn.cfg then Servicemix will resolve external maven dependencies based on your repositories defined in your POM (settings.XML).

              Seems like org.ops4j.pax.url.mvn.repositories over-rides the repositories in settings.XML.

               

               

              #
              # Comma separated list of repositories scanned when resolving an artifact.
              # The default list includes the following repositories:
              #    http://repo1.maven.org/maven2
              #    http://repository.ops4j.org/maven2
              # To add repositories to the default ones, prepend '+' to the list of repositories
              # to add.
              # A repository url can be appended with zero or more of the following flags:
              #    @snapshots  : the repository contains snaphots
              #    @noreleases : the repository does not contain any released artifacts
              #
              # The following property value will add the system folder as a repo.
              #
              # org.ops4j.pax.url.mvn.repositories= \
              #    http://repo1.maven.org/maven2, \
              #    http://repo.fusesource.com/maven2, \
              #    http://repo.fusesource.com/maven2-snapshot@snapshots@noreleases, \
              #    http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases, \
              #    http://repository.ops4j.org/maven2, \
              #    http://svn.apache.org/repos/asf/servicemix/m2-repo, \
              #    http://repository.springsource.com/maven/bundles/release, \
              #    http://repository.springsource.com/maven/bundles/external