Fix FELIX-4455 by providing a better error message
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1643185 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
index 1244349..a7bbc43 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
@@ -793,8 +793,10 @@
stop();
throw new RuntimeException("Cannot create a POJO instance, the POJO constructor has thrown an exception", e.getTargetException());
} catch (NoSuchMethodException e) {
+ // Improve the log message because of FELIX-4455, we will see if we get better feedback.
m_logger.log(Logger.ERROR,
- "[" + m_name + "] createInstance -> Cannot invoke the constructor (method not found) : " + e.getMessage(), e);
+ "[" + m_name + "] iPOJO did not find a suitable constructor to create the " +
+ "object: " + e.getMessage(), e);
stop();
throw new RuntimeException("Cannot create a POJO instance, the POJO constructor cannot be found", e);
} catch (Throwable e) {