diff --git a/ipojo/tests/core/logger/erroneous-component.xml b/ipojo/tests/core/logger/erroneous-component.xml
new file mode 100644
index 0000000..9ac7735
--- /dev/null
+++ b/ipojo/tests/core/logger/erroneous-component.xml
@@ -0,0 +1,5 @@
+<ipojo>
+<component immediate="true" classname="org.apache.felix.ipojo.tests.core.component.MyErroneousComponent">
+  <provides/>
+</component>
+</ipojo>
diff --git a/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ErrorHandlerTest.java b/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ErrorHandlerTest.java
new file mode 100644
index 0000000..1e0f7d6
--- /dev/null
+++ b/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ErrorHandlerTest.java
@@ -0,0 +1,160 @@
+package org.apache.felix.ipojo.tests.core;
+
+import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.provision;
+import static org.ops4j.pax.exam.MavenUtils.asInProject;
+import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
+import static org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOBuilder.withiPOJO;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.ErrorHandler;
+import org.apache.felix.ipojo.tests.core.component.MyComponent;
+import org.apache.felix.ipojo.tests.core.component.MyErroneousComponent;
+import org.apache.felix.ipojo.tests.core.service.MyService;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Inject;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.ow2.chameleon.testing.helpers.IPOJOHelper;
+import org.ow2.chameleon.testing.helpers.OSGiHelper;
+
+@RunWith( JUnit4TestRunner.class )
+public class ErrorHandlerTest {
+
+    @Inject
+    private BundleContext context;
+
+    private OSGiHelper osgi;
+
+    private IPOJOHelper ipojo;
+
+    @Before
+    public void init() {
+        osgi = new OSGiHelper(context);
+        ipojo = new IPOJOHelper(context);
+    }
+
+    @After
+    public void stop() {
+        ipojo.dispose();
+        osgi.dispose();
+    }
+
+    @Configuration
+    public static Option[] configure() {
+
+        File tmp = new File("target/tmp");
+        tmp.mkdirs();
+
+        Option[] opt =  options(
+                felix(),
+//                equinox(),
+                provision(
+                        // Runtime.
+                        mavenBundle().groupId( "org.apache.felix" ).artifactId( "org.apache.felix.log" ).version(asInProject()),
+                        mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()),
+                        mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject()
+                        ),
+                provision(
+                        newBundle()
+                            .add( MyService.class )
+                            .set(Constants.BUNDLE_SYMBOLICNAME,"ServiceInterface")
+                            .set(Constants.EXPORT_PACKAGE, "org.apache.felix.ipojo.tests.core.service")
+                            .build()
+                    ),
+               provision(
+                       // Component
+                        newBundle()
+                            .add(MyComponent.class)
+                            .set(Constants.BUNDLE_SYMBOLICNAME,"MyComponent")
+                            .set(Constants.IMPORT_PACKAGE, "org.apache.felix.ipojo.tests.core.service")
+                            .set("Ipojo-log-level", "info")
+                            .build( withiPOJO(new File(tmp, "provider-with-level-in-manifest.jar"), new File("component.xml")))
+                            ),
+                provision(
+                        // Component
+                         newBundle()
+                             .add(MyErroneousComponent.class)
+                             .set(Constants.BUNDLE_SYMBOLICNAME,"MyErroneousComponent")
+                             .set("Ipojo-log-level", "debug")
+                             .set(Constants.IMPORT_PACKAGE, "org.apache.felix.ipojo.tests.core.service")
+                             .build( withiPOJO(new File(tmp, "erroneous-provider-with-level-in-manifest.jar"), new File("erroneous-component.xml")))
+                             )
+                );
+        return opt;
+    }
+
+    @Test
+    public void testErrorHandlerEmpty() throws InterruptedException, InvalidSyntaxException {
+    	MyErrorHandler handler = new MyErrorHandler();
+    	context.registerService(ErrorHandler.class.getName(), handler, null);
+
+        System.out.println(handler.m_errors);
+
+        Assert.assertTrue(handler.m_errors.isEmpty());
+    }
+
+    @Test
+    public void testErrorHandler() throws InterruptedException, InvalidSyntaxException {
+    	MyErrorHandler handler = new MyErrorHandler();
+    	context.registerService(ErrorHandler.class.getName(), handler, null);
+
+    	try {
+    		ipojo.createComponentInstance("org.apache.felix.ipojo.tests.core.component.MyErroneousComponent");
+    	} catch (Exception e ) {
+    		System.out.println(e);
+    	}
+
+
+        System.out.println(handler.m_errors);
+
+        Assert.assertFalse(handler.m_errors.isEmpty());
+        Assert.assertTrue(handler.m_errors.contains("org.apache.felix.ipojo.tests.core.component.MyErroneousComponent-0:[org.apache.felix.ipojo.tests.core.component.MyErroneousComponent-0] createInstance -> Cannot invoke the constructor method - the constructor throws an exception : bad:bad"));
+    }
+
+
+   private class MyErrorHandler implements ErrorHandler {
+
+	   private List<String> m_errors = new ArrayList<String>();
+
+	   public void onError(ComponentInstance instance, String message,
+				Throwable error) {
+		   System.out.println("on Error ! " + instance + " - " + message);
+			if (instance == null) {
+				if (error == null) {
+					m_errors.add("no-instance:" + message);
+				} else {
+					m_errors.add("no-instance:" + message + ":" + error.getMessage());
+				}
+			} else {
+				if (error == null) {
+					m_errors.add(instance.getInstanceName() + ":" + message);
+				} else {
+					m_errors.add(instance.getInstanceName() + ":" + message + ":" + error.getMessage());
+				}
+			}
+		}
+
+	   public void onWarning(ComponentInstance instance, String message,
+				Throwable error) {
+		   System.out.println("on warning ! " + instance + " - " + message);
+		}
+
+   }
+
+
+}
diff --git a/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ManifestLoggerInfoTest.java b/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ManifestLoggerInfoTest.java
index 7a9e9b7..5ca7c9d 100644
--- a/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ManifestLoggerInfoTest.java
+++ b/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/ManifestLoggerInfoTest.java
@@ -1,5 +1,6 @@
 package org.apache.felix.ipojo.tests.core;
 
+import static org.ops4j.pax.exam.CoreOptions.equinox;
 import static org.ops4j.pax.exam.CoreOptions.felix;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
@@ -9,6 +10,7 @@
 import static org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOBuilder.withiPOJO;
 
 import java.io.File;
+import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Enumeration;
@@ -20,13 +22,14 @@
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Customizer;
 import org.ops4j.pax.exam.Inject;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -78,7 +81,7 @@
 
         Option[] opt =  options(
                 felix(),
-//                equinox(),
+                equinox(),
                 provision(
                         // Runtime.
                         mavenBundle().groupId( "org.apache.felix" ).artifactId( "org.apache.felix.log" ).version(asInProject()),
@@ -98,15 +101,22 @@
                             .add(MyComponent.class)
                             .set(Constants.BUNDLE_SYMBOLICNAME,"MyComponent")
                             .set(Constants.IMPORT_PACKAGE, "org.apache.felix.ipojo.tests.core.service")
-                            .set("ipojo-log-level", "info")
+                            .set("Ipojo-log-level", "info")
                             .build( withiPOJO(new File(tmp, "provider-with-level-in-manifest.jar"), new File("component.xml")))
-                            )
-                );
+                            ),
+                new Customizer() {
+                    @Override
+                    public InputStream customizeTestProbe( InputStream testProbe )
+                    {
+                       return TinyBundles.modifyBundle(testProbe)
+                           .set(Constants.IMPORT_PACKAGE, "org.apache.felix.ipojo.tests.core.service")
+                           .build();
+                    }
+                });
         return opt;
     }
 
     @Test
-    @Ignore //TODO Why we have a classloading issue here ?
     public void testMessages() throws InterruptedException, InvalidSyntaxException {
         Bundle bundle = osgi.getBundle("MyComponent");
         Assert.assertNotNull(bundle);
@@ -123,9 +133,9 @@
 
 
 
-   //     Assert.assertNotNull(osgi.getServiceObject(MyService.class.getName(), null));
+        Assert.assertNotNull(osgi.getServiceObject(MyService.class.getName(), null));
 
-//        osgi.waitForService("org.apache.felix.ipojo.tests.core.service.MyService", null, 5000);
+        osgi.waitForService("org.apache.felix.ipojo.tests.core.service.MyService", null, 5000);
         List<String> messages = getMessages(log.getLog());
         System.out.println(messages);
         Assert.assertTrue(messages.contains("Ready"));
diff --git a/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/component/MyErroneousComponent.java b/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/component/MyErroneousComponent.java
new file mode 100644
index 0000000..feca648
--- /dev/null
+++ b/ipojo/tests/core/logger/src/test/java/org/apache/felix/ipojo/tests/core/component/MyErroneousComponent.java
@@ -0,0 +1,15 @@
+package org.apache.felix.ipojo.tests.core.component;
+
+import org.apache.felix.ipojo.tests.core.service.MyService;
+
+public class MyErroneousComponent implements MyService {
+
+	public MyErroneousComponent() {
+		throw new NullPointerException("bad");
+	}
+
+    public void foo() {
+        // Nothing to do.
+    }
+
+}
