aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom De Wolf (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (ARIES-1591) Subsystem install fails due to ArrayIndexOutofBoundsException
Date Tue, 09 Aug 2016 06:42:20 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15413033#comment-15413033
] 

Tom De Wolf edited comment on ARIES-1591 at 8/9/16 6:41 AM:
------------------------------------------------------------

[~jwross@us.ibm.com] When I try this setup with felix resolver 1.8 I already get problems
when installing the reproduce-base-subsystem in step 2. These problems are however different
but related to the fragment's host (pax-web-jetty-bundle). Especially the 2nd and 3rd permutation
failure indicate that it thinks there are 2 different resources while it is the same bundle.
Probably the arrayindexoutofbounds is now masked by this problem:

{panel}
DEBUG: Candidate permutation failed due to a conflict between imports; will try another if
possible. (Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-jetty-bundle
[/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
because it is exposed to package 'org.osgi.service.log' from resources org.ops4j.pax.logging.pax-logging-api
[8.0] and org.apache.felix.gogo.command [1.0] via two dependency chains.

Chain 1:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.osgi.service.log)(&(version>=1.3.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]

Chain 2:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.apache.commons.logging)(&(version>=1.0.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package=org.apache.commons.logging; uses:=org.ops4j.pax.logging
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.ops4j.pax.logging)(version>=0.9.5)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package=org.ops4j.pax.logging; uses:=org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.osgi.service.log)(version>=1.3.0)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.apache.felix.gogo.command [1.0])
DEBUG: Candidate permutation failed due to a conflict between an export and import; will try
another if possible. (Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-jetty-bundle
[/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
because it exports package 'org.eclipse.jetty.util.log' and is also exposed to it from resource
org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
via the following dependency chain:

  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.eclipse.jetty.server.handler)(&(version>=9.2.0)(!(version>=10.0.0))))
     |
    export: osgi.wiring.package: org.eclipse.jetty.server.handler; uses:=org.eclipse.jetty.util.log
    export: osgi.wiring.package=org.eclipse.jetty.util.log
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar])
DEBUG: Candidate permutation failed due to a conflict between imports; will try another if
possible. (Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-jetty-bundle
[/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
because it is exposed to package 'org.osgi.service.log' from resources org.ops4j.pax.logging.pax-logging-api
[8.0] and org.apache.felix.gogo.command [1.0] via two dependency chains.

Chain 1:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.osgi.service.log)(&(version>=1.3.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]

Chain 2:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.apache.commons.logging)(&(version>=1.0.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package=org.apache.commons.logging; uses:=org.ops4j.pax.logging
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.ops4j.pax.logging)(version>=0.9.5)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package=org.ops4j.pax.logging; uses:=org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.osgi.service.log)(version>=1.3.0)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.apache.felix.gogo.command [1.0])
{panel}


was (Author: tom.dewolf):
When I try this setup with felix resolver 1.8 I already get problems when installing the reproduce-base-subsystem
in step 2. These problems are however different but related to the fragment's host (pax-web-jetty-bundle).
Especially the 2nd and 3rd permutation failure indicate that it thinks there are 2 different
resources while it is the same bundle. Probably the arrayindexoutofbounds is now masked by
this problem:

{panel}
DEBUG: Candidate permutation failed due to a conflict between imports; will try another if
possible. (Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-jetty-bundle
[/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
because it is exposed to package 'org.osgi.service.log' from resources org.ops4j.pax.logging.pax-logging-api
[8.0] and org.apache.felix.gogo.command [1.0] via two dependency chains.

Chain 1:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.osgi.service.log)(&(version>=1.3.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]

Chain 2:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.apache.commons.logging)(&(version>=1.0.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package=org.apache.commons.logging; uses:=org.ops4j.pax.logging
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.ops4j.pax.logging)(version>=0.9.5)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package=org.ops4j.pax.logging; uses:=org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.osgi.service.log)(version>=1.3.0)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.apache.felix.gogo.command [1.0])
DEBUG: Candidate permutation failed due to a conflict between an export and import; will try
another if possible. (Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-jetty-bundle
[/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
because it exports package 'org.eclipse.jetty.util.log' and is also exposed to it from resource
org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
via the following dependency chain:

  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.eclipse.jetty.server.handler)(&(version>=9.2.0)(!(version>=10.0.0))))
     |
    export: osgi.wiring.package: org.eclipse.jetty.server.handler; uses:=org.eclipse.jetty.util.log
    export: osgi.wiring.package=org.eclipse.jetty.util.log
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar])
DEBUG: Candidate permutation failed due to a conflict between imports; will try another if
possible. (Uses constraint violation. Unable to resolve resource org.ops4j.pax.web.pax-web-jetty-bundle
[/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
because it is exposed to package 'org.osgi.service.log' from resources org.ops4j.pax.logging.pax-logging-api
[8.0] and org.apache.felix.gogo.command [1.0] via two dependency chains.

Chain 1:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.osgi.service.log)(&(version>=1.3.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]

Chain 2:
  org.ops4j.pax.web.pax-web-jetty-bundle [/var/folders/9b/nqy6w5xs6gz1m1q4g6gpfr_c0000gn/T/inputStreamExtract1867503759233108111.zip/pax-web-jetty-bundle-4.2.5.jar]
    import: (&(osgi.wiring.package=org.apache.commons.logging)(&(version>=1.0.0)(!(version>=2.0.0))))
     |
    export: osgi.wiring.package=org.apache.commons.logging; uses:=org.ops4j.pax.logging
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.ops4j.pax.logging)(version>=0.9.5)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package=org.ops4j.pax.logging; uses:=org.osgi.service.log
  org.ops4j.pax.logging.pax-logging-api [8.0]
    import: (&(osgi.wiring.package=org.osgi.service.log)(version>=1.3.0)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package: org.osgi.service.log
  org.apache.felix.gogo.command [1.0])
{panel}

> Subsystem install fails due to ArrayIndexOutofBoundsException
> -------------------------------------------------------------
>
>                 Key: ARIES-1591
>                 URL: https://issues.apache.org/jira/browse/ARIES-1591
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: Tom De Wolf
>            Priority: Blocker
>             Fix For: subsystem-2.1.0
>
>         Attachments: reproduce-base-subsystem-4.1.2-SNAPSHOT.esa, reproduce-subsystem-4.1.2-SNAPSHOT.esa
>
>
> When we use the 2.0.9-SNAPSHOT version currently in development we get an ArrayIndexOutOfBoundsException
as soon as our base subsystem contains a fragment bundle:
> {panel}
> Caused by: org.osgi.service.subsystem.SubsystemException: java.lang.ArrayIndexOutOfBoundsException:
-1
> 	at org.apache.aries.subsystem.core.internal.Utils.handleTrowable(Utils.java:117)
> 	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:398)
> 	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:363)
> 	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:101)
> 	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:91)
> 	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:60)
> 	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:27)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:738)
> 	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:791)
> 	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:365)
> 	at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:70)
> 	... 30 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at org.apache.felix.resolver.util.CopyOnWriteList.set(CopyOnWriteList.java:53)
> 	at org.apache.felix.resolver.Candidates.prepare(Candidates.java:1052)
> 	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:173)
> 	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:393)
> 	... 41 more
> {panel}
> Attached are 2 subsystems that allow to reproduce it. Note that the ONLY difference between
these subsystem esa's and the onces attached at ARIES-1590 is the fragment bundle osgi-pax-web-jetty-config.
> So the problem might be related to the same commit, but another effect.
> Note: we are using the felix resolver 1.4.0
> Steps to reproduce:
> 1. start clean felix
> 2. install the attached reproduce-base-subsystem-4.1.2-SNAPSHOT.esa, do not start it
> 3. install the attached reproduce-subsystem-4.1.2-SNAPSHOT.esa
> Step 3 fails with the above exception.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message