There are some exception to connecting with database.