Home | History | Annotate | Download | only in impl

Lines Matching refs:classLoader

120      * determine system behaviour when a bad context-classloader is encountered.
122 * LogFactoryImpl is loaded via a child classloader of the TCCL (this
185 * classloader, or via the classloader that loaded this LogFactoryImpl class.
346 * throwing away a ClassLoader. Dangling references to objects in that
420 * Gets the context classloader.
424 protected static ClassLoader getContextClassLoader() throws LogConfigurationException {
443 protected static ClassLoader getClassLoader(Class clazz) {
452 * including which classloader the object was loaded from.
463 // It would be nice to include an identifier of the context classloader
473 ClassLoader classLoader = getClassLoader(clazz);
476 if (classLoader == null) {
479 classLoaderName = objectId(classLoader);
810 // for each possible classloader
814 // for each possible classloader
821 // logging libraries before looking in the parent classloader.
972 ClassLoader currentCL = getBaseClassLoader();
975 // Loop through the classloader hierarchy trying to find
976 // a viable classloader.
980 + "' from classloader "
985 // in the classpath. This is the location that ClassLoader.loadClass
986 // will load the class from -- unless the classloader is doing
993 url = ClassLoader.getSystemResource(resourceName + ".class");
1007 // The current classloader was unable to find the log adapter
1008 // in this or any ancestor classloader. There's no point in
1014 + "' is not available via classloader "
1019 // Try the class classloader.
1033 + "' is not available via the LogFactoryImpl class classloader: "
1067 // ancestor classloader. There's no point in trying higher up
1073 + "' is missing dependencies when loaded via classloader "
1089 + "' is unable to initialize itself when loaded via classloader "
1109 // try the parent classloader
1128 + "' from classloader " + objectId(currentCL)
1135 + "' from classloader " + objectId(logAdapterClass.getClassLoader())
1144 * Return the classloader from which we should try to load the logging
1147 * This method usually returns the context classloader. However if it
1148 * is discovered that the classloader which loaded this class is a child
1149 * of the context classloader <i>and</i> the allowFlawedContext option
1150 * has been set then the classloader which loaded this class is returned
1153 * The only time when the classloader which loaded this class is a
1155 * classloader) is when an app has created custom classloaders but
1156 * failed to correctly set the context classloader. This is a bug in
1161 private ClassLoader getBaseClassLoader() throws LogConfigurationException {
1162 ClassLoader thisClassLoader = getClassLoader(LogFactoryImpl.class);
1168 ClassLoader contextClassLoader = getContextClassLoader();
1170 ClassLoader baseClassLoader = getLowestClassLoader(
1181 "[WARNING] the context classloader is not part of a"
1182 + " parent-child relationship with the classloader that"
1192 "Bad classloader hierarchy; LogFactoryImpl was loaded via"
1193 + " a classloader that is not related to the current context"
1194 + " classloader.");
1202 // custom classloaders but fail to set the context classloader so
1207 "Warning: the context classloader is an ancestor of the"
1208 + " classloader that loaded LogFactoryImpl; it should be"
1210 + " commons-logging should ensure the context classloader"
1215 "Bad classloader hierarchy; LogFactoryImpl was loaded via"
1216 + " a classloader that is not related to the current context"
1217 + " classloader.");
1228 * @param c1 is a classloader (including the null classloader)
1229 * @param c2 is a classloader (including the null classloader)
1234 private ClassLoader getLowestClassLoader(ClassLoader c1, ClassLoader c2) {
1243 ClassLoader current;
1272 * @param classLoader is the classloader that we were trying to load the
1275 * @param discoveryFlaw is the Throwable created by the classloader
1280 ClassLoader classLoader,
1307 * classloader; Log@classloaderX cannot be cast to Log@classloaderY.
1313 * @param badClassLoader is the classloader we loaded the problem class from,
1322 private void handleFlawedHierarchy(ClassLoader badClassLoader, Class badClass)
1337 // it is in the wrong classloader
1340 ClassLoader logInterfaceClassLoader = getClassLoader(Log.class);
1343 + "' was found in classloader "
1346 + " the one loaded from classloader "