Java 类com.mysql.jdbc.Messages 实例源码

项目:the-vigilantes    文件:JDBC4Connection.java   
public JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class<?>[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class<?>[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:OpenVertretung    文件:JDBC4Connection.java   
public JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class<?>[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class<?>[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:lams    文件:JDBC4Connection.java   
public JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:ProyectoPacientes    文件:JDBC4Connection.java   
public JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class<?>[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class<?>[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:BibliotecaPS    文件:JDBC4Connection.java   
public JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class<?>[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class<?>[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:Geometry-wars    文件:JDBC4Connection.java   
public JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class<?>[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class<?>[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:TPKB    文件:JDBC4Connection.java   
protected JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:cloudera-cli-scripts    文件:JDBC4Connection.java   
protected JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:SMPT42    文件:JDBC4Connection.java   
protected JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:group-five    文件:JDBC4Connection.java   
protected JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:locaviewer    文件:JDBC4Connection.java   
protected JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:locaviewer    文件:JDBC4Connection.java   
protected JDBC4ClientInfoProvider getClientInfoProviderImpl() throws SQLException {
    synchronized (getConnectionMutex()) {
        if (this.infoProvider == null) {
            try {
                try {
                    this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance(getClientInfoProvider(), new Class[0], new Object[0],
                            getExceptionInterceptor());
                } catch (SQLException sqlEx) {
                    if (sqlEx.getCause() instanceof ClassCastException) {
                        // try with package name prepended
                        this.infoProvider = (JDBC4ClientInfoProvider) Util.getInstance("com.mysql.jdbc." + getClientInfoProvider(), new Class[0],
                                new Object[0], getExceptionInterceptor());
                    }
                }
            } catch (ClassCastException cce) {
                throw SQLError.createSQLException(Messages.getString("JDBC4Connection.ClientInfoNotImplemented", new Object[] { getClientInfoProvider() }),
                        SQLError.SQL_STATE_ILLEGAL_ARGUMENT, getExceptionInterceptor());
            }

            this.infoProvider.initialize(this, this.props);
        }

        return this.infoProvider;
    }
}
项目:the-vigilantes    文件:ConnectionRegressionTest.java   
public static boolean containsMessage(String msg, String key) {
    String[] expectedFragments = Messages.getString(key).split("\\{\\d\\}");
    for (int i = 0; i < expectedFragments.length; i++) {
        if (msg.indexOf(expectedFragments[i]) < 0) {
            return false;
        }
    }
    return true;
}
项目:the-vigilantes    文件:ConnectionRegressionTest.java   
private boolean isStatementClosedForTestBug69746(Statement statement) {
    try {
        statement.getResultSet();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("Statement.49"));
    }
    return false;
}
项目:the-vigilantes    文件:ConnectionRegressionTest.java   
private boolean isResultSetClosedForTestBug69746(ResultSet resultSet) {
    try {
        resultSet.first();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("ResultSet.Operation_not_allowed_after_ResultSet_closed_144"));
    }
    return false;
}
项目:the-vigilantes    文件:Sha256PasswordPlugin.java   
private static byte[] encryptPassword(String password, String seed, Connection connection, String key) throws SQLException {
    byte[] input = null;
    try {
        input = password != null ? StringUtils.getBytesNullTerminated(password, connection.getPasswordCharacterEncoding()) : new byte[] { 0 };
    } catch (UnsupportedEncodingException e) {
        throw SQLError.createSQLException(Messages.getString("Sha256PasswordPlugin.3", new Object[] { connection.getPasswordCharacterEncoding() }),
                SQLError.SQL_STATE_GENERAL_ERROR, null);
    }
    byte[] mysqlScrambleBuff = new byte[input.length];
    Security.xorString(input, mysqlScrambleBuff, seed.getBytes(), input.length);
    return ExportControlled.encryptWithRSAPublicKey(mysqlScrambleBuff,
            ExportControlled.decodeRSAPublicKey(key, ((MySQLConnection) connection).getExceptionInterceptor()),
            ((MySQLConnection) connection).getExceptionInterceptor());
}
项目:the-vigilantes    文件:MysqlXAConnection.java   
protected static XAException mapXAExceptionFromSQLException(SQLException sqlEx) {
    Integer xaCode = MYSQL_ERROR_CODES_TO_XA_ERROR_CODES.get(sqlEx.getErrorCode());

    if (xaCode != null) {
        return (XAException) new MysqlXAException(xaCode.intValue(), sqlEx.getMessage(), null).initCause(sqlEx);
    }

    return (XAException) new MysqlXAException(XAException.XAER_RMFAIL, Messages.getString("MysqlXAConnection.003"), null).initCause(sqlEx);
}
项目:the-vigilantes    文件:JDBC42Helper.java   
static int checkSqlType(int sqlType, ExceptionInterceptor exceptionInterceptor) throws SQLException {
    if (JDBC42Helper.isSqlTypeSupported(sqlType)) {
        return sqlType;
    }
    throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("UnsupportedSQLType.0") + JDBCType.valueOf(sqlType),
            SQLError.SQL_STATE_DRIVER_NOT_CAPABLE, exceptionInterceptor);
}
项目:OpenVertretung    文件:ConnectionRegressionTest.java   
public static boolean containsMessage(String msg, String key) {
    String[] expectedFragments = Messages.getString(key).split("\\{\\d\\}");
    for (int i = 0; i < expectedFragments.length; i++) {
        if (msg.indexOf(expectedFragments[i]) < 0) {
            return false;
        }
    }
    return true;
}
项目:OpenVertretung    文件:ConnectionRegressionTest.java   
private boolean isStatementClosedForTestBug69746(Statement statement) {
    try {
        statement.getResultSet();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("Statement.49"));
    }
    return false;
}
项目:OpenVertretung    文件:ConnectionRegressionTest.java   
private boolean isResultSetClosedForTestBug69746(ResultSet resultSet) {
    try {
        resultSet.first();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("ResultSet.Operation_not_allowed_after_ResultSet_closed_144"));
    }
    return false;
}
项目:OpenVertretung    文件:Sha256PasswordPlugin.java   
private static byte[] encryptPassword(String password, String seed, Connection connection, String key) throws SQLException {
    byte[] input = null;
    try {
        input = password != null ? StringUtils.getBytesNullTerminated(password, connection.getPasswordCharacterEncoding()) : new byte[] { 0 };
    } catch (UnsupportedEncodingException e) {
        throw SQLError.createSQLException(Messages.getString("Sha256PasswordPlugin.3", new Object[] { connection.getPasswordCharacterEncoding() }),
                SQLError.SQL_STATE_GENERAL_ERROR, null);
    }
    byte[] mysqlScrambleBuff = new byte[input.length];
    Security.xorString(input, mysqlScrambleBuff, seed.getBytes(), input.length);
    return ExportControlled.encryptWithRSAPublicKey(mysqlScrambleBuff,
            ExportControlled.decodeRSAPublicKey(key, ((MySQLConnection) connection).getExceptionInterceptor()),
            ((MySQLConnection) connection).getExceptionInterceptor());
}
项目:OpenVertretung    文件:MysqlXAConnection.java   
protected static XAException mapXAExceptionFromSQLException(SQLException sqlEx) {
    Integer xaCode = MYSQL_ERROR_CODES_TO_XA_ERROR_CODES.get(sqlEx.getErrorCode());

    if (xaCode != null) {
        return (XAException) new MysqlXAException(xaCode.intValue(), sqlEx.getMessage(), null).initCause(sqlEx);
    }

    return (XAException) new MysqlXAException(XAException.XAER_RMFAIL, Messages.getString("MysqlXAConnection.003"), null).initCause(sqlEx);
}
项目:OpenVertretung    文件:JDBC42Helper.java   
static int checkSqlType(int sqlType, ExceptionInterceptor exceptionInterceptor) throws SQLException {
    if (JDBC42Helper.isSqlTypeSupported(sqlType)) {
        return sqlType;
    }
    throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("UnsupportedSQLType.0") + JDBCType.valueOf(sqlType),
            SQLError.SQL_STATE_DRIVER_NOT_CAPABLE, exceptionInterceptor);
}
项目:lams    文件:Sha256PasswordPlugin.java   
private static byte[] encryptPassword(String password, String seed, Connection connection, String key) throws SQLException {
    byte[] input = null;
    try {
        input = password != null ? StringUtils.getBytesNullTerminated(password, connection.getPasswordCharacterEncoding()) : new byte[] { 0 };
    } catch (UnsupportedEncodingException e) {
        throw SQLError.createSQLException(Messages.getString("Sha256PasswordPlugin.3", new Object[] { connection.getPasswordCharacterEncoding() }),
                SQLError.SQL_STATE_GENERAL_ERROR, null);
    }
    byte[] mysqlScrambleBuff = new byte[input.length];
    Security.xorString(input, mysqlScrambleBuff, seed.getBytes(), input.length);
    return ExportControlled.encryptWithRSAPublicKey(mysqlScrambleBuff,
            ExportControlled.decodeRSAPublicKey(key, ((MySQLConnection) connection).getExceptionInterceptor()),
            ((MySQLConnection) connection).getExceptionInterceptor());
}
项目:lams    文件:MysqlXAConnection.java   
protected static XAException mapXAExceptionFromSQLException(SQLException sqlEx) {
    Integer xaCode = MYSQL_ERROR_CODES_TO_XA_ERROR_CODES.get(Integer.valueOf(sqlEx.getErrorCode()));

    if (xaCode != null) {
        return (XAException) new MysqlXAException(xaCode.intValue(), sqlEx.getMessage(), null).initCause(sqlEx);
    }

    return (XAException) new MysqlXAException(XAException.XAER_RMFAIL, Messages.getString("MysqlXAConnection.003"), null).initCause(sqlEx);
}
项目:lams    文件:JDBC42Helper.java   
static int checkSqlType(int sqlType, ExceptionInterceptor exceptionInterceptor) throws SQLException {
    if (JDBC42Helper.isSqlTypeSupported(sqlType)) {
        return sqlType;
    }
    throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("UnsupportedSQLType.0") + JDBCType.valueOf(sqlType),
            SQLError.SQL_STATE_DRIVER_NOT_CAPABLE, exceptionInterceptor);
}
项目:ProyectoPacientes    文件:ConnectionRegressionTest.java   
public static boolean containsMessage(String msg, String key) {
    String[] expectedFragments = Messages.getString(key).split("\\{\\d\\}");
    for (int i = 0; i < expectedFragments.length; i++) {
        if (msg.indexOf(expectedFragments[i]) < 0) {
            return false;
        }
    }
    return true;
}
项目:ProyectoPacientes    文件:ConnectionRegressionTest.java   
private boolean isStatementClosedForTestBug69746(Statement statement) {
    try {
        statement.getResultSet();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("Statement.49"));
    }
    return false;
}
项目:ProyectoPacientes    文件:ConnectionRegressionTest.java   
private boolean isResultSetClosedForTestBug69746(ResultSet resultSet) {
    try {
        resultSet.first();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("ResultSet.Operation_not_allowed_after_ResultSet_closed_144"));
    }
    return false;
}
项目:ProyectoPacientes    文件:Sha256PasswordPlugin.java   
private static byte[] encryptPassword(String password, String seed, Connection connection, String key) throws SQLException {
    byte[] input = null;
    try {
        input = password != null ? StringUtils.getBytesNullTerminated(password, connection.getPasswordCharacterEncoding()) : new byte[] { 0 };
    } catch (UnsupportedEncodingException e) {
        throw SQLError.createSQLException(Messages.getString("Sha256PasswordPlugin.3", new Object[] { connection.getPasswordCharacterEncoding() }),
                SQLError.SQL_STATE_GENERAL_ERROR, null);
    }
    byte[] mysqlScrambleBuff = new byte[input.length];
    Security.xorString(input, mysqlScrambleBuff, seed.getBytes(), input.length);
    return ExportControlled.encryptWithRSAPublicKey(mysqlScrambleBuff,
            ExportControlled.decodeRSAPublicKey(key, ((MySQLConnection) connection).getExceptionInterceptor()),
            ((MySQLConnection) connection).getExceptionInterceptor());
}
项目:ProyectoPacientes    文件:MysqlXAConnection.java   
protected static XAException mapXAExceptionFromSQLException(SQLException sqlEx) {
    Integer xaCode = MYSQL_ERROR_CODES_TO_XA_ERROR_CODES.get(sqlEx.getErrorCode());

    if (xaCode != null) {
        return (XAException) new MysqlXAException(xaCode.intValue(), sqlEx.getMessage(), null).initCause(sqlEx);
    }

    return (XAException) new MysqlXAException(XAException.XAER_RMFAIL, Messages.getString("MysqlXAConnection.003"), null).initCause(sqlEx);
}
项目:ProyectoPacientes    文件:JDBC42Helper.java   
static int checkSqlType(int sqlType, ExceptionInterceptor exceptionInterceptor) throws SQLException {
    if (JDBC42Helper.isSqlTypeSupported(sqlType)) {
        return sqlType;
    }
    throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("UnsupportedSQLType.0") + JDBCType.valueOf(sqlType),
            SQLError.SQL_STATE_DRIVER_NOT_CAPABLE, exceptionInterceptor);
}
项目:BibliotecaPS    文件:ConnectionRegressionTest.java   
public static boolean containsMessage(String msg, String key) {
    String[] expectedFragments = Messages.getString(key).split("\\{\\d\\}");
    for (int i = 0; i < expectedFragments.length; i++) {
        if (msg.indexOf(expectedFragments[i]) < 0) {
            return false;
        }
    }
    return true;
}
项目:BibliotecaPS    文件:ConnectionRegressionTest.java   
private boolean isStatementClosedForTestBug69746(Statement statement) {
    try {
        statement.getResultSet();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("Statement.49"));
    }
    return false;
}
项目:BibliotecaPS    文件:ConnectionRegressionTest.java   
private boolean isResultSetClosedForTestBug69746(ResultSet resultSet) {
    try {
        resultSet.first();
    } catch (SQLException ex) {
        return ex.getMessage().equalsIgnoreCase(Messages.getString("ResultSet.Operation_not_allowed_after_ResultSet_closed_144"));
    }
    return false;
}
项目:BibliotecaPS    文件:Sha256PasswordPlugin.java   
private static byte[] encryptPassword(String password, String seed, Connection connection, String key) throws SQLException {
    byte[] input = null;
    try {
        input = password != null ? StringUtils.getBytesNullTerminated(password, connection.getPasswordCharacterEncoding()) : new byte[] { 0 };
    } catch (UnsupportedEncodingException e) {
        throw SQLError.createSQLException(Messages.getString("Sha256PasswordPlugin.3", new Object[] { connection.getPasswordCharacterEncoding() }),
                SQLError.SQL_STATE_GENERAL_ERROR, null);
    }
    byte[] mysqlScrambleBuff = new byte[input.length];
    Security.xorString(input, mysqlScrambleBuff, seed.getBytes(), input.length);
    return ExportControlled.encryptWithRSAPublicKey(mysqlScrambleBuff,
            ExportControlled.decodeRSAPublicKey(key, ((MySQLConnection) connection).getExceptionInterceptor()),
            ((MySQLConnection) connection).getExceptionInterceptor());
}
项目:BibliotecaPS    文件:MysqlXAConnection.java   
protected static XAException mapXAExceptionFromSQLException(SQLException sqlEx) {
    Integer xaCode = MYSQL_ERROR_CODES_TO_XA_ERROR_CODES.get(sqlEx.getErrorCode());

    if (xaCode != null) {
        return (XAException) new MysqlXAException(xaCode.intValue(), sqlEx.getMessage(), null).initCause(sqlEx);
    }

    return (XAException) new MysqlXAException(XAException.XAER_RMFAIL, Messages.getString("MysqlXAConnection.003"), null).initCause(sqlEx);
}
项目:BibliotecaPS    文件:JDBC42Helper.java   
static int checkSqlType(int sqlType, ExceptionInterceptor exceptionInterceptor) throws SQLException {
    if (JDBC42Helper.isSqlTypeSupported(sqlType)) {
        return sqlType;
    }
    throw SQLError.createSQLFeatureNotSupportedException(Messages.getString("UnsupportedSQLType.0") + JDBCType.valueOf(sqlType),
            SQLError.SQL_STATE_DRIVER_NOT_CAPABLE, exceptionInterceptor);
}
项目:Geometry-wars    文件:ConnectionRegressionTest.java   
public static boolean containsMessage(String msg, String key) {
    String[] expectedFragments = Messages.getString(key).split("\\{\\d\\}");
    for (int i = 0; i < expectedFragments.length; i++) {
        if (msg.indexOf(expectedFragments[i]) < 0) {
            return false;
        }
    }
    return true;
}