FELIX-698 Log an INFO message only if the bundle whose components
should be started has been stopped in the mean time.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@688638 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/Activator.java b/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
index 79e1f6c..556bf5e 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
@@ -230,8 +230,21 @@
}
catch ( Exception e )
{
- log( LogService.LOG_ERROR, m_context.getBundle(), "Error while loading components of bundle "
- + bundle.getSymbolicName(), e );
+ if ( e instanceof IllegalStateException && bundle.getState() != Bundle.ACTIVE )
+ {
+ log(
+ LogService.LOG_INFO,
+ m_context.getBundle(),
+ "Bundle "
+ + bundle.getSymbolicName()
+ + " has been stopped while trying to activate its components. Trying again when the bundles gets startet again.",
+ e );
+ }
+ else
+ {
+ log( LogService.LOG_ERROR, m_context.getBundle(), "Error while loading components of bundle "
+ + bundle.getSymbolicName(), e );
+ }
}
}