You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2015/03/12 16:30:38 UTC

[jira] [Reopened] (FELIX-4495) Candidates from already resolved fragments get ignored if no new hosts are available

     [ https://issues.apache.org/jira/browse/FELIX-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet reopened FELIX-4495:
------------------------------------

This issue is causing me a NPE when asking the resolver to resolve a single resource which is an already resolved fragment.

[~tjwatson] How do you use the resolver in such a case ?

{code}
java.lang.NullPointerException
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:266)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
	at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:431)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4053)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
	at org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:]
	at org.apache.karaf.bundle.command.Resolve.doExecute(Resolve.java:32)[12:org.apache.karaf.bundle.core:4.0.0.SNAPSHOT]
	at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)[12:org.apache.karaf.bundle.core:4.0.0.SNAPSHOT]
	at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:267)[28:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
	at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
{code}

> Candidates from already resolved fragments get ignored if no new hosts are available
> ------------------------------------------------------------------------------------
>
>                 Key: FELIX-4495
>                 URL: https://issues.apache.org/jira/browse/FELIX-4495
>             Project: Felix
>          Issue Type: Bug
>          Components: Resolver
>    Affects Versions: resolver-1.0.0
>            Reporter: Thomas Watson
>             Fix For: resolver-1.2.0
>
>         Attachments: org.apache.felix.resolver.patch
>
>
> org.apache.felix.resolver.Candidates.populateResource(ResolveContext, Resource) gets called for fragments even if they are already resolved so that we can attach them to more hosts as needed.
> The issue is that this method will throw a ResolutionException if the fragment cannot attach to any new hosts during the current resolve process.  This has the effect of removing any candidate capabilities provided by already resolved fragments.



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