Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-5972

prevent ArrayIndexOutOfBoundsException while resolving

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Resolver
    • None

    Description

      **Describe the bug
      when resolving I got an java.lang.ArrayIndexOutOfBoundsException: -1

      it may cause the -runpath Instruction

      To Reproduce
      push the resolve button at test.log/works.bndrun -> it resolves
      push the resolve button at test.log/fail.bndrun -> Exception
      the only diff is that there is one mor required bundle

      i tried so centralize all logging instructions
      cnf/ext/logging.bnd

      provide an Example
      Repo: https://github.com/stbischof/logging/tree/master

      Command:

      java -jar biz.aQute.bnd-4.1.0.jar clean
      java -jar biz.aQute.bnd-4.1.0.jar _par
      java -jar biz.aQute.bnd-4.1.0.jar resolve resolve **/fail.bndrun 
      

       

      Expected behavior
      it should resolve

      Stacktrace

       

      java.lang.ArrayIndexOutOfBoundsException: -1 000: Exception: java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:422) at java.util.ArrayList.set(ArrayList.java:450) at org.apache.felix.resolver.util.ShadowList.replace(ShadowList.java:74) at org.apache.felix.resolver.Candidates.prepare(Candidates.java:939) at org.apache.felix.resolver.ResolverImpl.getInitialCandidates(ResolverImpl.java:547) at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:432) at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:421) at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:375) at biz.aQute.resolve.BndResolver.resolve(BndResolver.java:32) at biz.aQute.resolve.ResolveProcess.resolveRequired(ResolveProcess.java:81) at biz.aQute.resolve.ProjectResolver.resolve(ProjectResolver.java:105) at biz.aQute.resolve.Bndrun.resolve(Bndrun.java:95) at aQute.bnd.main.ResolveCommand._resolve(ResolveCommand.java:275) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at aQute.lib.getopt.CommandLine.execute(CommandLine.java:150) at aQute.lib.getopt.CommandLine.subCmd(CommandLine.java:624) at aQute.bnd.main.bnd._resolve(bnd.java:4237) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at aQute.lib.getopt.CommandLine.execute(CommandLine.java:150) at aQute.bnd.main.bnd._bnd(bnd.java:444) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at aQute.lib.getopt.CommandLine.execute(CommandLine.java:150) at aQute.bnd.main.bnd.start(bnd.java:292) at aQute.bnd.main.bnd.main(bnd.java:269) 

      **

       

       

      Environment (please complete the following information):

      • bnd-Version: bndtools 4.2.0.2018.10.19.2218-SNAPSHOT
      • Java-Version: java -version

       

      openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-b15) OpenJDK 64-Bit Server VM (build 25.181-b15, mixed mode)  
      
      
      • bnd-Part: bnd-lib,bndtools
      • OS: Linux
      • OSGi-Framework: Felix
      • Related Spec: none

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bischofs@jena.de Stefan Bischof
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: