[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] R-OSGi NullPointerException

Hi Markus,

I'm sorry I started SLP and JmDNS together, but I did of course only wanted one discovery provider running. But the Exception does still come from SLP! The following error is also still with JmDNS:

[log;+0100 2010.11.28 14:57:05:814;ERROR;org.eclipse.ecf.osgi.services.distribution;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.distribution;code=4;message=org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl:registerRemoteServiceReferences:Remote service is null for remote reference RemoteServiceReference[remoteServiceID=org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=r-osgi://jumper:9280;containerRelativeID=60];ref=RemoteServiceReference{r-osgi://jumper:9280#60-[devsosgi.Node]}];severity4;exception=null;children=[]]]
Exception in thread "r-OSGi ChannelWorkerThread0" java.lang.NullPointerException
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.handleMessage(ChannelEndpointImpl.java:1076)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$2.run(ChannelEndpointImpl.java:288)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$1.run(ChannelEndpointImpl.java:253)
[log;+0100 2010.11.28 14:57:08:528;ERROR;org.eclipse.ecf.osgi.services.distribution;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.distribution;code=4;message=org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl:handleDiscoveredServiceAvailable:getRemoteServiceReferences result is empty. containerHelper=RemoteServiceContainer [containerID=r-osgi://jumper:9279, container=org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer@303ec561, containerAdapter=org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer@303ec561]remoteReferences=null;severity4;exception=null;children=[]]]


Am 27.11.2010 14:05, schrieb Martin Petzold:
Hi Markus,

Am 26.11.2010 09:28, schrieb Markus Alexander Kuppe:
On 11/25/2010 04:45 PM, Martin Petzold wrote:
Hi folks,

I use ECF (3.4.0.v20101029-1626) and R-OSGi as distribution provider and
start two instances of my node component (each an osgi instance) on THE
SAME machine quickly after each other. I get the following Exception. If
I wait about perhaps 10sec. there is no problem.


!ENTRY org.eclipse.osgi 4 0 2010-11-25 16:36:14.600
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
java.lang.NullPointerException
at
ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl$3.modifiedService(RemoteOSGiServiceImpl.java:556)



at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerModified(ServiceTracker.java:909)



at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)



at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)



at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)



at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:171)



at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.registerRemoteService(R_OSGiRemoteServiceContainer.java:370)



at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.registerRemoteService(R_OSGiRemoteServiceContainer.java:342)



at
org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.handleRegisteredServiceEvent(EventHookImpl.java:126)



at
org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.event(EventHookImpl.java:65)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyEventHooksPrivileged(ServiceRegistry.java:1143)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:743)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525)



at
devsosgi.simulator.atomic.AtomicComponentTracker.addingService(AtomicComponentTracker.java:41)



at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)



at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)


at
org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)



at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)



at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)



at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)



at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525)



at devsosgi.model.processor.Activator.start(Activator.java:25)
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)



at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)



at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)



at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)



at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)



at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)



at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)



at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)



at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)



at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)



at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)



at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)




The problem still does occur sometimes, I can't really reproduce it.
do you use any discovery provider?
Discovery Provider is SLP (ch.ethz.iks.slp, org.eclipse.ecf.provider.jmdns and org.eclipse.ecf.provider.jslp started).
Is there log output on the console? What kind of service are you trying to remote?
On the Controller side (Controller bundle, separate OSGi framework instance) I listen to a Node service (my own Interface) and a Simulator service (my own Interface) via ServiceTracker (two separate ones). Output is:
------------------------------
osgi> No support for IPv6 in jSLP yet (see https://bugs.eclipse.org/328074), skipping interface...
No support for IPv6 in jSLP yet (see https://bugs.eclipse.org/328074), skipping interface...
No support for IPv6 in jSLP yet (see https://bugs.eclipse.org/328074), skipping interface...
[log;+0100 2010.11.27 13:43:46:410;INFO;org.eclipse.ecf.remoteservice;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.remoteservice;code=0;message=No async remote service interface found with name=devsosgi.NodeAsync for proxy service class=devsosgi.Node;severity2;exception=null;children=[]]]
[27.11.2010 13:43:46][devsosgi.controller.gui.panels.node.NodeTracker] INFO : Node 5bff5153-d5de-4c90-9fb0-cab2c1eb72bf has been registered!
[log;+0100 2010.11.27 13:43:48:927;ERROR;org.eclipse.ecf.osgi.services.distribution;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.distribution;code=4;message=org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl:handleDiscoveredServiceAvailable:getRemoteServiceReferences result is empty. containerHelper=RemoteServiceContainer [containerID=r-osgi://jumper:9278, container=org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer@2e19fc25, containerAdapter=org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer@2e19fc25]remoteReferences=null;severity4;exception=null;children=[]]]


[log;+0100 2010.11.27 13:43:51:490;ERROR;org.eclipse.ecf.osgi.services.distribution;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.distribution;code=4;message=org.eclipse.ecf.internal.osgi.services.distribution.DiscoveredServiceTrackerImpl:registerRemoteServiceReferences:Remote service is null for remote reference RemoteServiceReference[remoteServiceID=org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=r-osgi://jumper:9279;containerRelativeID=63];ref=RemoteServiceReference{r-osgi://jumper:9279#63-[devsosgi.simulator.Simulator]}];severity4;exception=null;children=[]]]
------------------------------
On the Node side (Node bundle, separate OSGi framework instance) I listen to a Component service (in the lokal framework instance) via ServiceTracker and register for each a remote Simulator services instance. As this is automatically via the addingService() of the ServiceTracker for the Components it occurs very shortly after each other (because i start up with two Components at start level 2).


Output (+ the already mentioned Exception!):
------------------------------
osgi> WARNING: Port 9278 already in use. This instance of R-OSGi is running on port 9279
No support for IPv6 in jSLP yet (see https://bugs.eclipse.org/328074), skipping interface...
No support for IPv6 in jSLP yet (see https://bugs.eclipse.org/328074), skipping interface...
No support for IPv6 in jSLP yet (see https://bugs.eclipse.org/328074), skipping interface...
[27.11.2010 13:43:42][devsosgi.simulator.atomic.AtomicComponentTracker] INFO : devsosgi.model.processor.Processor -> Creating simulator.
!SESSION 2010-11-27 13:43:41.100 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments: -dev file:[...]/workspace/.metadata/.plugins/org.eclipse.pde.core/DEVSOSGiNode/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console -clean
------------------------------
Sometimes there is also this Exception:
------------------------------
[log;+0100 2010.11.27 13:35:12:360;INFO;org.eclipse.ecf.osgi.services.discovery;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.discovery;code=1;message=serviceDiscovered:ignoring loopback ServiceReference: ServiceID[type=ServiceTypeID[typeName=_osgiservices._tcp.default._iana];location=osgiservices://192.168.0.104:9279/svc_1v+IgIQSdwWVEwvmNle+PwwYEIU=;full=_osgiservices._tcp.default._iana@osgiservices://192.168.0.104:9279/svc_1v+IgIQSdwWVEwvmNle+PwwYEIU=];severity1;exception=null;children=[]]]
Exception in thread "r-OSGi ChannelWorkerThread0" java.lang.NullPointerException
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.populateLease(ChannelEndpointImpl.java:1375)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.handleMessage(ChannelEndpointImpl.java:1025)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$2.run(ChannelEndpointImpl.java:288)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl$1.run(ChannelEndpointImpl.java:253)
------------------------------


Martin



--
Martin Petzold

Martinsfeld 14
D-50676 Köln
Deutschland

Telefon: +49 (0)221 / 2595961
Mobil: +49 (0)179 / 9220154

Blog: www.zetablog.de