Package org.apache.openjpa.lib.log

Examples of org.apache.openjpa.lib.log.Log.error()


                        if (log.isWarnEnabled())
                            log.warn(warning);
                        break;
                    case WARN_LOG_ERROR:
                        if (log.isErrorEnabled())
                            log.error(warning);
                        break;
                    case WARN_THROW:
                        // just throw it as if it were a SQLException
                        throw warning;
                    case WARN_HANDLE:
View Full Code Here


                    re = getCreateException(clsName, val, re);
                if (fatal)
                    throw re;
                Log log = (conf == null) ? null : conf.getConfigurationLog();
                if (log != null && log.isErrorEnabled())
                    log.error(_loc.get("plugin-creation-exception", val), re);
                return null;
            }
        }

        try {
View Full Code Here

                ("obj-create", cls).getMessage(), e);
            if (fatal)
                throw re;
            Log log = (conf == null) ? null : conf.getConfigurationLog();
            if (log != null && log.isErrorEnabled())
                log.error(_loc.get("plugin-creation-exception", val), re);
            return null;
        }
    }

    /**
 
View Full Code Here

        // ensure plugin value is compatible with plugin type
        if (obj != null && !type.isAssignableFrom(obj.getClass())) {
            Log log = (conf == null || type.equals(LogFactory.class)) ? null : conf.getConfigurationLog();
            String msg = getIncompatiblePluginMessage(obj, type);
            if (log != null && log.isErrorEnabled()) {
              log.error(msg);
            }
            if (fatal) {
              throw new ParseException(msg);
            }
            return null;
View Full Code Here

        if (cls == null) {
            if (fatal)
              throw getCreateException(clsName, val, new ClassNotFoundException(clsName));
            Log log = (conf == null) ? null : conf.getConfigurationLog();
          if (log != null && log.isErrorEnabled())
              log.error(_loc.get("plugin-creation-exception", val));
          return null;
       }

        try {
            return AccessController.doPrivileged(J2DoPrivHelper.newInstanceAction(cls));
View Full Code Here

            RuntimeException re = new NestableRuntimeException(_loc.get("obj-create", cls).getMessage(), e);
            if (fatal)
                throw re;
            Log log = (conf == null) ? null : conf.getConfigurationLog();
            if (log != null && log.isErrorEnabled())
                log.error(_loc.get("plugin-creation-exception", val), re);
            return null;
        }
    }

    /**
 
View Full Code Here

    }
   
    void error(ClassMetaData meta, Localizer.Message message) {
      Log log = meta.getRepository().getConfiguration()
        .getLog(OpenJPAConfiguration.LOG_RUNTIME);
      log.error(message.toString());
      throw new UserException(message.toString());
    }
   
    void warn(ClassMetaData meta, Localizer.Message message) {
      Log log = meta.getRepository().getConfiguration()
View Full Code Here

    }
   
    void error(ClassMetaData meta, Localizer.Message message) {
      Log log = meta.getRepository().getConfiguration()
        .getLog(OpenJPAConfiguration.LOG_RUNTIME);
      log.error(message.toString());
      throw new UserException(message.toString());
    }
   
    void warn(ClassMetaData meta, Localizer.Message message) {
      Log log = meta.getRepository().getConfiguration()
View Full Code Here

                    break;
                case Warn:
                    log.warn(args[1]);
                    break;
                case Error:
                    log.error(args[1]);
                    break;
                case Trace:
                    log.trace(args[1]);
                    break;
View Full Code Here

                    break;
                case Warn:
                    log.warn(args[1]);
                    break;
                case Error:
                    log.error(args[1]);
                    break;
                case Trace:
                    log.trace(args[1]);
                    break;
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.