Can you try launching the felix which hosts the client bundle in the debug
mode and then set a breakpoint in your custom Activator ? The dosgi
trunk/felix module has a remote_debug.txt file, copy & paste it, just ensure
the suspended flag is set to yes, and then start a remote debugging from
Eclipse and see what is happening...

Cheers, Sergey

On Wed, Feb 2, 2011 at 5:23 PM, Pierre-Henry Perret <[email protected]>wrote:

>
>
> Hello,
>
> I have a remote web service that I want to proxy in an OSGi framework .
> For that, I use the dosgi bundle to read the ws endpoint description, and
> this works fine, (see the dosgi bundle inspection at the end of the post)
>
> Next, In an activator I track the service and when it is found , do a call
> to a method of the interface/service:
> ________________
> service.callMethod(param);
> _______________________
>
> And then this error flows:
>
> ___________________________________________
>
> 2 févr. 2011 17:27:29
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service 
> {http://xx.yy.zz.org/}HardwareMonitor<http://xx.yy.zz.org/%7DHardwareMonitor>from
>  class
> org.xx.webservices.bd.HardwareMonitor
> ERROR: EventDispatcher: Error during dispatch.
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at
> xx.yy.zz.services.consumer.Activator$1.addingService(Activator.java:22)
>        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.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871)
>        at
>
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733)
>        at
>
> org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
>        at
> org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3735)
>        at org.apache.felix.framework.Felix.access$000(Felix.java:80)
>        at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:722)
>        at
>
> org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107)
>        at org.apache.felix.framework.Felix.registerService(Felix.java:2847)
>        at
>
> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
>        at
>
> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
>        at
>
> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.proxifyMatchingInterface(RemoteServiceAdminCore.java:440)
>        at
>
> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.importService(RemoteServiceAdminCore.java:396)
>        at
>
> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$2.run(RemoteServiceAdminInstance.java:131)
>        at
>
> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$2.run(RemoteServiceAdminInstance.java:124)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at
>
> org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.importService(RemoteServiceAdminInstance.java:124)
>        at
>
> org.apache.cxf.dosgi.topologymanager.TopologyManagerImport.importService(TopologyManagerImport.java:308)
>        at
>
> org.apache.cxf.dosgi.topologymanager.TopologyManagerImport.importAllServicesStrategy(TopologyManagerImport.java:239)
>        at
>
> org.apache.cxf.dosgi.topologymanager.TopologyManagerImport.access$300(TopologyManagerImport.java:41)
>        at
>
> org.apache.cxf.dosgi.topologymanager.TopologyManagerImport$1.run(TopologyManagerImport.java:197)
>        at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:619)
> log FrameworkEvent ERROR
>
> ________________________________________________
>
> It seems that when the registration occurs, an exception is thrown (because
> of a NPE?) and the registration stops with the service registered, see the
> output of bundle dosgi inspection:
>
> _________________________________________
> endpoint.id =
> http://xx.yy.zz.tt/webservice/service.php?class=hardwareMonitor
> objectClass = org.xx.yy.zz.HardwareMonitor
> service.id = 16
> service.imported = true
> service.imported.configs = org.apache.cxf.ws
> ________________________________________________
>
> It seems difficult to track this bug.
>
>
> -----
> --
> Pierre
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Error-during-dispatcher-tp3368150p3368150.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to