Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8399C7A1E for ; Thu, 1 Dec 2011 11:44:10 +0000 (UTC) Received: (qmail 76500 invoked by uid 500); 1 Dec 2011 11:44:09 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 76428 invoked by uid 500); 1 Dec 2011 11:44:09 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 76420 invoked by uid 99); 1 Dec 2011 11:44:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 11:44:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of loic.petit@gmail.com designates 209.85.161.49 as permitted sender) Received: from [209.85.161.49] (HELO mail-fx0-f49.google.com) (209.85.161.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 11:44:02 +0000 Received: by faaf16 with SMTP id f16so210400faa.22 for ; Thu, 01 Dec 2011 03:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=MJIa54qYHrhrLR1nNg9aNWnRjMSP5+AO4bK6FNx6acY=; b=PsSTG6SNRq7NQmkGYHXGiaoCTjfUVagVIyG+AaFIVAoIIbQggjWhttxpww3Dm3IL+M DepJ80Ta//GA5uihMwpmZrtgmVxmOjKucHCqPGJQVn3bwWdslkZFUXWgYZkA+Y4efV9q yu8wQQjXLK1j5JDx2F9qYq0XDkVxAG6PhGQTw= MIME-Version: 1.0 Received: by 10.204.154.143 with SMTP id o15mr6981817bkw.17.1322739821124; Thu, 01 Dec 2011 03:43:41 -0800 (PST) Received: by 10.205.81.3 with HTTP; Thu, 1 Dec 2011 03:43:41 -0800 (PST) Date: Thu, 1 Dec 2011 12:43:41 +0100 Message-ID: Subject: [iPOJO] Bug while calling dispose under knopflerfish From: Loic Petit To: users@felix.apache.org Content-Type: multipart/alternative; boundary=0015175cb1f22b1c8d04b3065d96 --0015175cb1f22b1c8d04b3065d96 Content-Type: text/plain; charset=ISO-8859-1 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 --0015175cb1f22b1c8d04b3065d96--