Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2728

feature:install fails with ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 3.0.0
    • 3.0.2, 4.0.0.M3
    • None
    • None

    Description

      I can't install a feature generated by karaf-maven-plugin 3.0.0:

      $ bin/karaf clean
              __ __                  ____      
             / //_/____ __________ _/ __/      
            / ,<  / __ `/ ___/ __ `/ /_        
           / /| |/ /_/ / /  / /_/ / __/        
          /_/ |_|\__,_/_/   \__,_/_/         
      
        Apache Karaf (3.0.0)
      
      Hit '<tab>' for a list of available commands
      and '[cmd] --help' for help on a specific command.
      Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
      
      karaf@root()> feature:repo-add mvn:at.molindo/some-feature/1.0.0-SNAPSHOT/xml/features
      Adding feature url mvn:at.molindo/some-feature/1.0.0-SNAPSHOT/xml/features
      karaf@root()> feature:install some-feature 
      Error executing command: -1
      

      The feature discriptor is pretty simple, containing a couple of Maven artifacts (one of which has the wrap: prefix)

      log:display shows this error:

      2014-01-23 17:25:48,181 | INFO  | Local user karaf | FeaturesServiceImpl              | 1 - org.apache.karaf.features.core - 3.0.0 | Installing feature some-feature 1.0.0-SNAPSHOT
      2014-01-23 17:25:48,325 | ERROR | Local user karaf | ShellUtil                        | 47 - org.apache.karaf.shell.console - 3.0.0 | Exception caught while executing command
      java.lang.ArrayIndexOutOfBoundsException: -1
      	at java.util.ArrayList.elementData(ArrayList.java:371)[:1.7.0_25]
      	at java.util.ArrayList.remove(ArrayList.java:448)[:1.7.0_25]
      	at org.apache.felix.framework.resolver.Candidates.prepare(Candidates.java:767)
      	at org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:122)
      	at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:403)
      	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3967)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:469)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:428)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:363)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:352)
      	at Proxy870d27d9_70ea_4eb1_be8d_696af5256b1c.installFeature(Unknown Source)
      	at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)
      	at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:38)
      	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
      	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
      	at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_25]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
      	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_25]
      	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
      	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
      	at org.apache.karaf.shell.console.commands.$BlueprintCommand1805556267.execute(Unknown Source)[47:org.apache.karaf.shell.console:3.0.0]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_25]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
      	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_25]
      	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
      	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
      	at org.apache.karaf.shell.console.commands.$BlueprintCommand1805556267.execute(Unknown Source)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
      	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:497)
      	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:198)
      	at java.lang.Thread.run(Thread.java:724)[:1.7.0_25]
      	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:118)[47:org.apache.karaf.shell.console:3.0.0]
      	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:109)
      	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_25]
      	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[48:org.apache.karaf.jaas.modules:3.0.0]
      	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:107)[47:org.apache.karaf.shell.console:3.0.0]
      

      Not sure what else to provide, so feel free to ask for additional information.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            sfussenegger Stefan Fussenegger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: