Examples of LogConfigurationException


Examples of com.arjuna.common.util.exceptions.LogConfigurationException

         // get a new logger from the log subsystem's factory and wrap it into a LogInterface
          return new JakartaRelevelingLogger(org.apache.commons.logging.LogFactory.getLog(clazz));
      }
      catch (org.apache.commons.logging.LogConfigurationException lce)
      {
         throw new LogConfigurationException(lce.getMessage());
      }
      finally
      {
          resetFactory(oldConfig);
      }
View Full Code Here

Examples of com.arjuna.common.util.exceptions.LogConfigurationException

         // get a new logger from the log subsystem's factory and wrap it into a LogInterface
          return new JakartaRelevelingLogger(org.apache.commons.logging.LogFactory.getLog(name));
      }
      catch (org.apache.commons.logging.LogConfigurationException lce)
      {
         throw new LogConfigurationException(lce.getMessage());
      }
      finally
      {
          resetFactory(oldConfig);
      }
View Full Code Here

Examples of com.arjuna.common.util.exceptions.LogConfigurationException

         // get a new logger from the log subsystem's factory and wrap it into a LogInterface
         return new JakartaLogger(org.apache.commons.logging.LogFactory.getLog(clazz));
      }
      catch (org.apache.commons.logging.LogConfigurationException lce)
      {
         throw new LogConfigurationException(lce.getMessage());
      }
      finally
      {
          resetFactory(oldConfig);
      }
View Full Code Here

Examples of com.arjuna.common.util.exceptions.LogConfigurationException

         // get a new logger from the log subsystem's factory and wrap it into a LogInterface
         return new JakartaLogger(org.apache.commons.logging.LogFactory.getLog(name));
      }
      catch (org.apache.commons.logging.LogConfigurationException lce)
      {
         throw new LogConfigurationException(lce.getMessage());
      }
      finally
      {
          resetFactory(oldConfig);
      }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.commons.logging.LogConfigurationException

          if (e.getTargetException() instanceof SecurityException) {
            ; // ignore
          } else {
            // Capture 'e.getTargetException()' exception for details
            // alternate: log 'e.getTargetException()', and pass back 'e'.
            throw new LogConfigurationException(
                "Unexpected InvocationTargetException", e.getTargetException());
          }
        }
      } catch (NoSuchMethodException e) {
        // Assume we are running on JDK 1.1
View Full Code Here

Examples of org.apache.commons.logging.LogConfigurationException

                    if (e.getTargetException() instanceof SecurityException) {
                        // ignore
                    } else {
                        // Capture 'e.getTargetException()' exception for details
                        // alternate: log 'e.getTargetException()', and pass back 'e'.
                        throw new LogConfigurationException
                            ("Unexpected InvocationTargetException", e.getTargetException());
                    }
                }
            } catch (NoSuchMethodException e) {
                // Assume we are running on JDK 1.1
View Full Code Here

Examples of org.apache.commons.logging.LogConfigurationException

        Class logInterface = null;
        try {
            logInterface = loadClass(LOG_INTERFACE);
            logClass = loadClass(logClassName);
            if (logClass == null) {
                throw new LogConfigurationException
                    ("No suitable Log implementation for " + logClassName);
            }
            if (!logInterface.isAssignableFrom(logClass)) {
                Class interfaces[] = logClass.getInterfaces();
                for (int i = 0; i < interfaces.length; i++) {
                    if (LOG_INTERFACE.equals(interfaces[i].getName())) {
                        throw new LogConfigurationException
                            ("Invalid class loader hierarchy.  " +
                             "You have more than one version of '" +
                             LOG_INTERFACE + "' visible, which is " +
                             "not allowed.");
                    }
                }
                throw new LogConfigurationException
                    ("Class " + logClassName + " does not implement '" +
                     LOG_INTERFACE + "'.");
            }
        } catch (Throwable t) {
            throw new LogConfigurationException(t);
        }

        // Identify the <code>setLogFactory</code> method (if there is one)
        try {
            logMethod = logClass.getMethod("setLogFactory",
                                           logMethodSignature);
        } catch (Throwable t) {
            logMethod = null;
        }

        // Identify the corresponding constructor to be used
        try {
            logConstructor = logClass.getConstructor(logConstructorSignature);
            return (logConstructor);
        } catch (Throwable t) {
            throw new LogConfigurationException
                ("No suitable Log constructor " +
                 logConstructorSignature+ " for " + logClassName, t);
        }
    }
View Full Code Here

Examples of org.apache.commons.logging.LogConfigurationException

            }
            return (instance);
        } catch (InvocationTargetException e) {
            Throwable c = e.getTargetException();
            if (c != null) {
                throw new LogConfigurationException(c);
            } else {
                throw new LogConfigurationException(e);
            }
        } catch (Throwable t) {
            throw new LogConfigurationException(t);
        }

    }
View Full Code Here

Examples of org.apache.commons.logging.LogConfigurationException

        final org.apache.logging.log4j.Logger logger = PrivateManager.getLogger(name);
        if (logger instanceof AbstractLogger) {
            loggers.putIfAbsent(name, new Log4jLog((AbstractLogger) logger, name));
            return loggers.get(name);
        }
        throw new LogConfigurationException(
            "Commons Logging Adapter requires base logging system to extend Log4j AbstractLogger");
    }
View Full Code Here

Examples of org.apache.commons.logging.LogConfigurationException

        // Attempt to load the Log implementation class
        Class logClass = null;
        try {
            logClass = loadClass(logClassName);
            if (logClass == null) {
                throw new LogConfigurationException
                    ("No suitable Log implementation for " + logClassName);
            }
            if (!Log.class.isAssignableFrom(logClass)) {
                throw new LogConfigurationException
                    ("Class " + logClassName + " does not implement Log");
            }
        } catch (Throwable t) {
            throw new LogConfigurationException(t);
        }

        // Identify the <code>setLogFactory</code> method (if there is one)
        try {
            logMethod = logClass.getMethod("setLogFactory",
                                           logMethodSignature);
        } catch (Throwable t) {
            logMethod = null;
        }

        // Identify the corresponding constructor to be used
        try {
            logConstructor = logClass.getConstructor(logConstructorSignature);
            return (logConstructor);
        } catch (Throwable t) {
            throw new LogConfigurationException
                ("No suitable Log constructor " +
                 logConstructorSignature+ " for " + logClassName, t);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.