FELIX-2823 Catch all exceptions from BundleContext.getService for propery logging and recovery
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1067009 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
index c98a516..89302d7 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -784,14 +784,14 @@
{
service = m_componentManager.getActivator().getBundleContext().getService( serviceReference );
}
- catch ( IllegalStateException ise )
+ catch ( Exception e )
{
// caused by getService() called on invalid bundle context
// or if there is a service reference cycle involving service
// factories !
m_componentManager.log( LogService.LOG_ERROR, "Failed getting service {0} ({1}/{2,number,#})", new Object[]
{ m_dependencyMetadata.getName(), m_dependencyMetadata.getInterface(),
- serviceReference.getProperty( Constants.SERVICE_ID ) }, ise );
+ serviceReference.getProperty( Constants.SERVICE_ID ) }, e );
service = null;
}