private static ClassLoader findParentClassLoader() {
        ClassLoader parent = XMPPServer.class.getClassLoader();
        if (parent == null) {
            parent = PluginClassLoader.class.getClassLoader();
        }
        if (parent == null) {
            parent = ClassLoader.getSystemClassLoader();
        }
        return parent;
    }
Locates the best parent class loader based on context.

@return the best parent classloader to use.
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginClassLoader.java