You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Xtra Coder (JIRA)" <ji...@apache.org> on 2014/05/23 13:18:02 UTC
[jira] [Updated] (FELIX-4520) NullPointerException in "fileinstall"
thread - ResolverImpl.calculatePackageSpaces(ResolverImpl.java:553), felix
framework v4.2.1
[ https://issues.apache.org/jira/browse/FELIX-4520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xtra Coder updated FELIX-4520:
------------------------------
Description:
I've got this NPE while updating a bundle in deploy folder (I'm running my staff under Karaf 3.0). Occurs in the following excerpt of org.apache.felix.framework.resolver.ResolverImpl - wire.getProviderWiring() is null
// Wrap the capability as a hosted capability if it comes
// from a fragment, since we will need to know the host.
BundleCapability c = wire.getCapability();
if (!c.getRevision().equals(wire.getProviderWiring().getRevision()))
{
c = new WrappedCapability(
wire.getProviderWiring().getRevision(),
(BundleCapabilityImpl) c);
}
Initial startup of the system goes without problems. Let me known if some more details required from my side.
*Update*: I suspect the problem is cause by another thread running in parallel and setting wiring to null. I did not notice any synchronization between fileinstall and FelixFrameworkWiring thread and later one may set m_wiring to null after fileinstall has checked it to be not null.
"FelixFrameworkWiring"
org.apache.felix.framework.BundleRevisionImpl.resolve(BundleRevisionImpl.java:303)
org.apache.felix.framework.BundleRevisionImpl.close(BundleRevisionImpl.java:653)
org.apache.felix.framework.BundleImpl.closeRevisions(BundleImpl.java:158)
org.apache.felix.framework.BundleImpl.refresh(BundleImpl.java:175)
org.apache.felix.framework.Felix.refreshBundle(Felix.java:4362)
org.apache.felix.framework.Felix.access$900(Felix.java:74)
org.apache.felix.framework.Felix$RefreshHelper.refreshOrRemove(Felix.java:4824)
org.apache.felix.framework.Felix.refreshPackages(Felix.java:4113)
org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:178)
java.lang.Thread.run(Thread.java:744)
was:
I've got this NPE while updating a bundle in deploy folder (I'm running my staff under Karaf 3.0). Occurs in the following excerpt of org.apache.felix.framework.resolver.ResolverImpl - wire.getProviderWiring() is null
// Wrap the capability as a hosted capability if it comes
// from a fragment, since we will need to know the host.
BundleCapability c = wire.getCapability();
if (!c.getRevision().equals(wire.getProviderWiring().getRevision()))
{
c = new WrappedCapability(
wire.getProviderWiring().getRevision(),
(BundleCapabilityImpl) c);
}
Initial startup of the system goes without problems. Let me known if some more details required from my side.
> NullPointerException in "fileinstall" thread - ResolverImpl.calculatePackageSpaces(ResolverImpl.java:553), felix framework v4.2.1
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-4520
> URL: https://issues.apache.org/jira/browse/FELIX-4520
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Reporter: Xtra Coder
>
> I've got this NPE while updating a bundle in deploy folder (I'm running my staff under Karaf 3.0). Occurs in the following excerpt of org.apache.felix.framework.resolver.ResolverImpl - wire.getProviderWiring() is null
> // Wrap the capability as a hosted capability if it comes
> // from a fragment, since we will need to know the host.
> BundleCapability c = wire.getCapability();
> if (!c.getRevision().equals(wire.getProviderWiring().getRevision()))
> {
> c = new WrappedCapability(
> wire.getProviderWiring().getRevision(),
> (BundleCapabilityImpl) c);
> }
>
> Initial startup of the system goes without problems. Let me known if some more details required from my side.
> *Update*: I suspect the problem is cause by another thread running in parallel and setting wiring to null. I did not notice any synchronization between fileinstall and FelixFrameworkWiring thread and later one may set m_wiring to null after fileinstall has checked it to be not null.
> "FelixFrameworkWiring"
> org.apache.felix.framework.BundleRevisionImpl.resolve(BundleRevisionImpl.java:303)
> org.apache.felix.framework.BundleRevisionImpl.close(BundleRevisionImpl.java:653)
> org.apache.felix.framework.BundleImpl.closeRevisions(BundleImpl.java:158)
> org.apache.felix.framework.BundleImpl.refresh(BundleImpl.java:175)
> org.apache.felix.framework.Felix.refreshBundle(Felix.java:4362)
> org.apache.felix.framework.Felix.access$900(Felix.java:74)
> org.apache.felix.framework.Felix$RefreshHelper.refreshOrRemove(Felix.java:4824)
> org.apache.felix.framework.Felix.refreshPackages(Felix.java:4113)
> org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:178)
> java.lang.Thread.run(Thread.java:744)
--
This message was sent by Atlassian JIRA
(v6.2#6252)