felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Loic Petit <loic.pe...@gmail.com>
Subject [iPOJO] Bug while calling dispose under knopflerfish
Date Thu, 01 Dec 2011 11:43:41 GMT
Hiyo !

I'm having trouble using ipojo under knopflerfish (3.2.0). I use the API to
create and dispose component at runtime. But there is one component that
throws a bug while calling InstanceManager.dispose (the other one works
just fine).
The component can be summed up like this :

@Component(immediate = true)
@Provides
public class CoreImpl implements Core {
    @Requires
    private OperatorFactory of; // INSTANCE strategy component
    @Requires
    private EventScheduler es; // INSTANCE strategy component
    @Property(mandatory = true)
    private SourceConfig sc;
}

FYI, this works under felix. I'm using ipojo 1.8.0 release but I tried
using the trunk core, same thing.
And : here is the stack trace of the exception :

java.lang.UnsupportedOperationException: This service requires an advanced
creation policy. Before calling the service, call the
getService(ComponentInstance) method to get the service object.
    at
org.apache.felix.ipojo.handlers.providedservice.ProvidedService$PerInstanceStrategy.invoke(ProvidedService.java:795)
    at $Proxy6.hashCode(Unknown Source)
    at java.util.HashMap$Entry.hashCode(HashMap.java:737)
    at java.util.AbstractMap.hashCode(AbstractMap.java:494)
    at
org.knopflerfish.framework.ListenerEntry.hashCode(ListenerEntry.java:64)
    at java.util.HashMap.put(HashMap.java:389)
    at java.util.HashSet.add(HashSet.java:217)
    at org.knopflerfish.framework.Hooks.toImmutableSet(Hooks.java:256)
    at
org.knopflerfish.framework.Hooks.handleServiceListenerUnreg(Hooks.java:225)
    at
org.knopflerfish.framework.ServiceListenerState.remove(ServiceListenerState.java:118)
    at
org.knopflerfish.framework.Listeners.removeServiceListener(Listeners.java:227)
    at
org.knopflerfish.framework.BundleContextImpl.removeServiceListener(BundleContextImpl.java:185)
    at
org.apache.felix.ipojo.IPojoContext.removeServiceListener(IPojoContext.java:393)
    at org.apache.felix.ipojo.util.Tracker.close(Tracker.java:237)
    at
org.apache.felix.ipojo.util.DependencyModel.stop(DependencyModel.java:217)
    at
org.apache.felix.ipojo.handlers.dependency.Dependency.stop(Dependency.java:227)
    at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.__stop(DependencyHandler.java:634)
    at
org.apache.felix.ipojo.handlers.dependency.DependencyHandler.stop(DependencyHandler.java)
    at org.apache.felix.ipojo.HandlerManager.stop(HandlerManager.java:169)
    at org.apache.felix.ipojo.InstanceManager.stop(InstanceManager.java:377)
    at
org.apache.felix.ipojo.InstanceManager.dispose(InstanceManager.java:416)

Thanks !

LP

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message