5 Replies Latest reply on Sep 2, 2013 5:10 AM by kpagan

    Problem installing bundle from remote repository

    kpagan Newbie

      Hello all,

      I use JBoss Fuse jboss-fuse-6.0.0.redhat-024 and I am trying to install a bundle from the company's Artifactory.

      My org.ops4j.pax.url.mvn.cfg configuration is like this:

       

      org.ops4j.pax.url.mvn.useFallbackRepositories=false
      org.ops4j.pax.url.mvn.disableAether=true
      org.ops4j.pax.url.mvn.defaultRepositories=file:${karaf.home}/${karaf.default.repository}@snapshots@id=karaf.${karaf.default.repository},\
          file:${karaf.home}/local-repo@snapshots@id=karaf.local-repo
      org.ops4j.pax.url.mvn.repositories = http://swint.athens.intrasoft-intl.private:8081/artifactory/repo@id=swlocal
      org.ops4j.pax.url.mvn.certificateCheck = false
      org.ops4j.pax.url.mvn.proxySupport = true
      

       

      I don't use local repository as I don't have a local maven installation in the server where the JBoss Fuse is running.

      Please note that I have excluded the default repositories and left only the company Artifactory that caches the default repositories anyway.

      If I leave the default ones the search for a bundle may take even 30 minutes or more.

       

      When I try to install a bundle by giving the command:

      osgi:install -s mvn:com.intrasoft.sw/sw-workflow
      

       

      I get the exception:

      2013-08-30 12:54:37,791 | INFO  | Thread-126       | Console                          | 15 - org.apache.karaf.shell.console - 2.3.0.redhat-60024 | Exception caught while executing command
      org.apache.karaf.shell.console.MultiException: Error installing bundles:
              Unable to install bundle mvn:com.intrasoft.sw/sw-workflow
              at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)
              at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
              at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at org.apache.karaf.shell.console.jline.Console.run(Console.java:176)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]
              at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.doRun(ShellFactoryImpl.java:151)[26:org.apache.karaf.shell.ssh:2.3.0.redhat-60024]
              at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4$1.run(ShellFactoryImpl.java:142)[26:org.apache.karaf.shell.ssh:2.3.0.redhat-60024]
              at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_21]
              at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[29:org.apache.karaf.jaas.modules:2.3.0.redhat-60024]
              at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.run(ShellFactoryImpl.java:140)[26:org.apache.karaf.shell.ssh:2.3.0.redhat-60024]
      Caused by: java.lang.Exception: Unable to install bundle mvn:com.intrasoft.sw/sw-workflow
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45)
              ... 16 more
      Caused by: org.osgi.framework.BundleException: Unable to cache bundle: mvn:com.intrasoft.sw/sw-workflow
              at org.apache.felix.framework.Felix.installBundle(Felix.java:3051)
              at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43)
              ... 16 more
      Caused by: java.lang.RuntimeException: URL [mvn:com.intrasoft.sw/sw-workflow] could not be resolved.
              at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
              at org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524)
              at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165)
              at org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77)
              at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
              at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
              at org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153)
              at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
              at org.apache.felix.framework.Felix.installBundle(Felix.java:3047)
              ... 18 more
      
      

      even though the artifact is deployed in the Artifactory.

      Please also note that the http://swint.athens.intrasoft-intl.private:8081 is an local network server that is not behind proxy (even though I have set proxySupport = true).

       

      I installed successfully using the command

       osgi:install -s http://swint.athens.intrasoft-intl.private:8081/artifactory/simple/single-window-snapshot-local/com/intrasoft/sw/sw-workflow/1.0-SNAPSHOT/sw-workflow-1.0-20130830.092040-1.jar
      

       

      But this is not the way it is supposed to install bundles, right?