John Ross created ARIES-1485:
--------------------------------

             Summary: java.lang.UnsupportedOperationException when a hosted 
capability is being inserted by the resolver.
                 Key: ARIES-1485
                 URL: https://issues.apache.org/jira/browse/ARIES-1485
             Project: Aries
          Issue Type: Improvement
          Components: Subsystem
    Affects Versions: subsystem-2.0.8
            Reporter: John Ross
            Assignee: John Ross


This is similar to ARIES-1439. There are two resolve contexts in subsystems. 
One is used for the "real" resolution of a subsystem at start time. This is 
used for all subsystems and the one that was modified in that other issue. The 
second one is used in order to calculate the dependencies of a subsystem as 
part of installation. This one is only used for applications and features since 
composites explicitly define their sharing policies.

Although, based on FELIX-4727, the resolver will be updated to implement the 
optional add() method, there are releases out there that don't. The same change 
made in ARIES-1439 should be made in the second resolve context for consistency 
and to avoid any issues.

Caused by: java.lang.UnsupportedOperationException
        at 
org.apache.felix.resolver.util.CopyOnWriteList.add(CopyOnWriteList.java:135)
        at 
org.apache.aries.subsystem.core.internal.DependencyCalculator$ResolveContext.insertHostedCapability(DependencyCalculator.java:86)
        at org.apache.felix.resolver.Candidates.prepare(Candidates.java:934)
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:232)
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)
        at 
org.apache.aries.subsystem.core.internal.DependencyCalculator.calculateDependencies(DependencyCalculator.java:163)
        at 
org.apache.aries.subsystem.core.internal.RawSubsystemResource.computeRequirements(RawSubsystemResource.java:447)
        at 
org.apache.aries.subsystem.core.internal.RawSubsystemResource.<init>(RawSubsystemResource.java:138)
        at 
org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:91)
        at 
org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:54)



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

Reply via email to