Package org.apache.openjpa.lib.log

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


            if (join.getType() == Join.TYPE_INNER) {
                if (join.getForeignKey() != null
                    && !_dict.canOuterJoin(_joinSyntax, join.getForeignKey())) {
                    Log log = _conf.getLog(JDBCConfiguration.LOG_JDBC);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-outer-fk",
                            join.getForeignKey()));
                } else
                    join.setType(Join.TYPE_OUTER);
            }
            if (add)
View Full Code Here


        OpenJPAConfiguration conf = slice.getConfiguration();
        String url = conf.getConnectionURL();
        Log log = conf.getConfigurationLog();
        if (isLenient) {
            if (ex != null) {
                log.warn(_loc.get("slice-connect-known-warn", slice, url, ex.getCause()));
            } else {
                log.warn(_loc.get("slice-connect-warn", slice, url));
            }
        } else if (ex != null) {
            throw new UserException(_loc.get("slice-connect-known-error", slice, url, ex), ex.getCause());
View Full Code Here

        Log log = conf.getConfigurationLog();
        if (isLenient) {
            if (ex != null) {
                log.warn(_loc.get("slice-connect-known-warn", slice, url, ex.getCause()));
            } else {
                log.warn(_loc.get("slice-connect-warn", slice, url));
            }
        } else if (ex != null) {
            throw new UserException(_loc.get("slice-connect-known-error", slice, url, ex), ex.getCause());
        } else {
            throw new UserException(_loc.get("slice-connect-error", slice, url));
View Full Code Here

            for (String name:values)
                if (!sliceNames.contains(name.trim()))
                    sliceNames.add(name.trim());
        } else {
            if (log.isWarnEnabled())
                log.warn(_loc.get("no-slice-names", key));
            sliceNames = scanForSliceNames(p);
            Collections.sort(sliceNames);
        }
        if (log.isInfoEnabled()) {
            log.info(_loc.get("slice-available", sliceNames));
View Full Code Here

                // as to not potentially insert records ahead of what the database thinks is the next sequence value.
                if (updateSql(conn, dict.getAlterSequenceSQL(_seq)) == -1) {
                    if (!alreadyLoggedAlterSeqFailure) {
                        Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
                        if (log.isWarnEnabled()) {
                            log.warn(_loc.get("fallback-no-seq-cache", _seqName));
                        }
                    }
                    alreadyLoggedAlterSeqFailure = true;
                    _allocate = 1;
                }
View Full Code Here

        if (log.isTraceEnabled())
            log.trace(_loc.get("parse-query", name));

        QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
        if (meta != null && log.isWarnEnabled())
            log.warn(_loc.get("override-query", name, currentLocation()));

        meta = getRepository().addQueryMetaData(null, name);
        meta.setDefiningType(_cls);
        meta.setQueryString(attrs.getValue("query"));
        meta.setLanguage(JPQLParser.LANG_JPQL);
View Full Code Here

        if (log.isTraceEnabled())
            log.trace(_loc.get("parse-native-query", name));

        QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
        if (meta != null && log.isWarnEnabled())
            log.warn(_loc.get("override-query", name, currentLocation()));

        meta = getRepository().addQueryMetaData(null, name);
        meta.setDefiningType(_cls);
        meta.setQueryString(attrs.getValue("query"));
        meta.setLanguage(QueryLanguages.LANG_SQL);
View Full Code Here

            int timeout = fetch.getLockTimeout();
            Log log = _conf.getLog(JDBCConfiguration.LOG_JDBC);
            if (timeout < 1000) {
                timeout = 1000;
                if (log.isWarnEnabled())
                    log.warn(_loc.get("millis-query-timeout"));
            }
            try {
                stmnt.setQueryTimeout(fetch.getLockTimeout() / 1000);
            }
            catch(SQLException e) {
View Full Code Here

            if (join.getType() == Join.TYPE_INNER) {
                if (join.getForeignKey() != null
                    && !_dict.canOuterJoin(_joinSyntax, join.getForeignKey())) {
                    Log log = _conf.getLog(JDBCConfiguration.LOG_JDBC);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-outer-fk",
                            join.getForeignKey()));
                } else
                    join.setType(Join.TYPE_OUTER);
            }
            if (add)
View Full Code Here

                pui.getClassLoader());
            if (transformerException != null) {
                Log log = factory.getConfiguration().getLog(
                    OpenJPAConfiguration.LOG_RUNTIME);
                if (log.isTraceEnabled()) {
                    log.warn(
                        _loc.get("transformer-registration-error-ex", pui),
                        transformerException);
                } else {
                    log.warn(
                        _loc.get("transformer-registration-error", pui));
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.