Community
Participate
Working Groups
-> AbstractTopologyManager should be compatible with Eclipse (Equinox) 3.6.1 ----- Caused by: java.lang.NullPointerException at org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.getFrameworkUUID(AbstractTopologyManager.java:59) at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.getEndpointListenerScope(BasicTopologyManager.java:49) at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.start(BasicTopologyManager.java:64) at org.eclipse.ecf.internal.osgi.services.distribution.Activator.start(Activator.java:101) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) ----- my woraround at the moment private String uuid = null; [...] public AbstractTopologyManager(BundleContext context) { this.context = context; this.uuid = UUID.randomUUID().toString(); } protected BundleContext getContext() { return context; } protected String getFrameworkUUID() { if(Activator.getDefault() != null) { return Activator.getDefault().getFrameworkUUID(); } else { return this.uuid; } } [...]
Martin...I suspect that if the org.eclipse.ecf.osgi.services.remoteserviceadmin bundle starts correctly (see the new proxy bundle issue) that Activator.getDefault().getFrameworkUUID() will not return null and you will not get an NPE). I think it's probably returning null from Activator.getDefault()...which should not happen if the bundle is started correctly/successfully. I should, however, guard against the possibility that getDefault() returns null (since getFrameworkUUID() should be thread safe), so I will add such a guard to this code shortly/later this morning.
This bug would then be connected to https://bugs.eclipse.org/bugs/show_bug.cgi?id=338107.
(In reply to comment #2) > This bug would then be connected to > https://bugs.eclipse.org/bugs/show_bug.cgi?id=338107. How is this bug related to bug #338107? This one is about an NPE in AbstractTopologyManager, while bug #338107 is about PDE not compiling/including classes (e.g. AbstractTopologyManager) in a (local) build.
Because (In reply to comment #3) > (In reply to comment #2) > > This bug would then be connected to > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=338107. > > How is this bug related to bug #338107? This one is about an NPE in > AbstractTopologyManager, while bug #338107 is about PDE not compiling/including > classes (e.g. AbstractTopologyManager) in a (local) build. Sorry again, it's not connected. But I think Scott is right, it's about the bundle not startet correctly (start levels perhaps).
This is most likely fixed, at least due to fix of bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=338107 ...and the bugs where connected somehow ;-)
(In reply to comment #5) > This is most likely fixed, at least due to fix of bug: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=338107 > > ...and the bugs where connected somehow ;-) Just for your information...they were connected since the remoteserviceadmin bundle wasn't starting properly in your environment, the call in AbstractTopologyManager to Activator.getDefault() was returning null, and so the line Activator.getDefault().getFrameworkUUID() was throwing a NPE.