Karaf shutdown : classLoader issue when creating an InitialContext
Issue
We are getting following error message when Fuse is shutting down:
25 Feb 2015 14:32:35,981 | ERROR | FelixShutdown | BeanRecipe | 10 - org.apache.aries.blueprint.core - 1.0.1.redhat-610394 | The blueprint bean connectorFactory in bundle org.apache.karaf.management.server/2.3.0.redhat-610394 incorrectly threw an exception from its destroy method.
java.io.IOException: Cannot bind to URL: javax.naming.NoInitialContextException: Cannot instantiate class: org.eclipse.jetty.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.eclipse.jetty.jndi.InitialContextFactory not found by com.test.app.ws [271]]
In our environment, Fuse is not started by calling "java.exe org.apache.karaf.main.Main", it is called from a C++ application that use C++ to start a JVM, create a native Thread and invoke this code:
public class KarafLauncher {
private static Main main = new Main(new String[0]);
public static void start() throws Exception {
// Start Karaf
main.launch();
}
public static void stop() throws Exception {
// stop Karaf
main.destroy();
}
}
Environment
- JBoss Fuse 6.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
