Code Monkey home page Code Monkey logo

Comments (6)

janste63 avatar janste63 commented on May 24, 2024

Which version of the component bundle is used?

from knopflerfish.org.

magicmike2248 avatar magicmike2248 commented on May 24, 2024

6.0.2, built from develop

from knopflerfish.org.

magicmike2248 avatar magicmike2248 commented on May 24, 2024

Also reproducible in component_all-5.0.3.jar

from knopflerfish.org.

janste63 avatar janste63 commented on May 24, 2024

Mike,
I think you're right in your analysis, we need to add the new id.
Could you do the following changes and re-test?

--- a/osgi/bundles/component/src/org/knopflerfish/bundle/component/Reference.java
+++ b/osgi/bundles/component/src/org/knopflerfish/bundle/component/Reference.java
@@ -314,9 +314,9 @@ class Reference implements org.apache.felix.scr.Reference
           listener = null;
           // NYI, optimize, we don't have to checkTargetChanged again
         }
-      } else if (useNoId) {
-        // No change, just make sure that ccid is registered
-        listener.addId(ccid, true);
+      } else {
+        // No change, add new ccid or replace if was NO_CCID.
+        listener.addId(ccid, useNoId);
       }
     }
     if (factoryListeners != null) {

from knopflerfish.org.

magicmike2248 avatar magicmike2248 commented on May 24, 2024

I applied the changes, and it started working a little bit better, NPE is not thrown when component instances are created for the first time, but if I then delete their configurations and create them again, NPE is thrown.
I tested it with a larger setup, ~50 components of different types with complex dependencies between them.

from knopflerfish.org.

janste63 avatar janste63 commented on May 24, 2024

Fixed this issue in component version 6.0.3. The new version also contains a number of other fixes related to factory configurations. I'll closes this now. If there are any other remaining problems, create a new issue.

from knopflerfish.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.