Hi Peter,

Though I think, this is certainly a corner case, it is not a nice
behaviour. The correct behaviour would probably be to check whether the
bundle is still set on the service reference and abort processing if not.

Can you please file a JIRA issue to track this ? Thanks.

Regards
Felix

peter.doornbosch schrieb:
>     Hi,
> 
> I get a NullPointerException in the ConfigAdmin's update thread, that is
> originating from the following piece of code (ConfigurationManager):
> 
> private class ManagedServiceFactoryUpdate implements Runnable
> 
> (...)
> 
>         public void run()
>         {
>             Factory factory;
>             try
>             {
>                 factory = getFactory( factoryPid );
>             }
>             catch ( IOException ioe )
>             {
>                 log( LogService.LOG_ERROR, "Cannot get factory mapping
> for factory PID " + factoryPid, ioe );
>                 return;
>             }
> 
>             String bundleLocation = sr.getBundle().getLocation();
> 
> 
> The NPE occurs in the last line. From the context it is clear that "sr"
> is not null, hence, sr.getBundle() returns null.
> I guess this is caused by a bundle that is stopped concurrently? I see
> in the log that the bundle that registered the "offending" service is
> stopped around the time of the NPE....
> 
> I used version 1.0.1 of configadmin, but the same code fragment is still
> in the trunk.
> 
> Regards,
> Peter.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to