Package railo.runtime.exp

Examples of railo.runtime.exp.DatabaseException


    DataSource ds=(datasource==null)?null:(DataSource) datasources.get(datasource.toLowerCase());
    if(ds!=null) return ds;
   
   
    // create error detail
    DatabaseException de = new DatabaseException("datasource ["+datasource+"] doesn't exist",null,null,null);
    de.setDetail(ExceptionUtil.createSoundexDetail(datasource,datasources.keySet().iterator(),"datasource names"));
    de.setAdditional(KeyConstants._Datasource,datasource);
    throw de;
  }
View Full Code Here


        //config.getDatasourceConnectionPool().remove(name);
        DataSource ds=null;
    try {
      ds = new DataSourceImpl(name,classname,host,dsn,database,port,username,password,connLimit,connTimeout,metaCacheTimeout,blob,clob,allow,custom,false,validate,storage,null, dbdriver);
    } catch (ClassException e) {
      throw new DatabaseException(
          "can't find class ["+classname+"] for jdbc driver, check if driver (jar file) is inside lib folder ("+e.getMessage()+")",null,null,null);
    }
       
        if(verify)_doVerifyDatasource(classname,ds.getDsnTranslated(),username,password);
        //print.out("limit:"+connLimit);
View Full Code Here

        }
    }

    private void _doVerifyDatasource(Class clazz, String dsn, String username, String password) throws PageException {
            if(!Reflector.isInstaneOf(clazz,Driver.class))
                throw new DatabaseException("class ["+clazz.getName()+"] is not a JDBC Driver","class must implement interface [java.sql.Driver]",null,null);
        getConnection(dsn, username, password);
    }
View Full Code Here

        try {
          conn = DBUtil.getConnection(dsn, user, pass);
            conn.setAutoCommit(true);
        }
        catch (SQLException e) {
            throw new DatabaseException(e,null);
        }
        return conn;
    }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.DatabaseException

Copyright © 2018 www.massapicom. 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.