diff --git a/Drupal_Apache_Solr_Service.php b/Drupal_Apache_Solr_Service.php
index f8d0318..43e06e2 100644
--- a/Drupal_Apache_Solr_Service.php
+++ b/Drupal_Apache_Solr_Service.php
@@ -1,5 +1,5 @@
 <?php
-require_once 'SolrPhpClient/Apache/Solr/Service.php';
+include_once 'SolrPhpClient/Apache/Solr/Service.php';
 
 class Drupal_Apache_Solr_Service extends Apache_Solr_Service {
 
diff --git a/apachesolr.install b/apachesolr.install
index cac920d..5b57e2a 100644
--- a/apachesolr.install
+++ b/apachesolr.install
@@ -10,10 +10,13 @@
  */
 function apachesolr_requirements($phase) {
   $requirements = array();
+  if ($phase != 'runtime') {
+    return $requirements;
+  }
   $file_exists = file_exists(dirname(__FILE__) . '/SolrPhpClient/Apache/Solr/Service.php');
   // Ensure translations don't break at install time
   $t = get_t();
-  if ($phase == 'runtime' && $file_exists) {
+  if ($file_exists) {
     $host = variable_get('apachesolr_host', 'localhost');
     $port = variable_get('apachesolr_port', 8983);
     $path = variable_get('apachesolr_path', '/solr');
@@ -21,7 +24,6 @@ function apachesolr_requirements($phase) {
     try {
       $solr = apachesolr_get_solr();
       $ping = @$solr->ping(variable_get('apachesolr_ping_timeout', 4));
-      // If there is no $solr object, there is no server available, so don't continue.
       if (!$ping) {
         throw new Exception(t('No Solr instance available when checking requirements.'));
       }
@@ -41,7 +43,7 @@ function apachesolr_requirements($phase) {
       'severity' => $severity,
     );
   }
-  // All phases
+  // Check the version of the library.
   $title = $t('Apache Solr PHP Client Library');
   if ($file_exists) {
     $expected_revision = 'Revision: 22';
diff --git a/apachesolr.module b/apachesolr.module
index 356c77e..53a635e 100644
--- a/apachesolr.module
+++ b/apachesolr.module
@@ -1317,9 +1317,14 @@ function apachesolr_get_solr($host = NULL, $port = NULL, $path = NULL) {
   if (empty($solr_cache[$host][$port][$path])) {
     list($module, $filepath, $class) = variable_get('apachesolr_service_class', array('apachesolr', 'Drupal_Apache_Solr_Service.php', 'Drupal_Apache_Solr_Service'));
     include_once(drupal_get_path('module', $module) .'/'. $filepath);
-    $solr = new $class($host, $port, $path);
+    if (class_exists($class)) {
+      $solr = new $class($host, $port, $path);
 
-    $solr_cache[$host][$port][$path] = $solr;
+      $solr_cache[$host][$port][$path] = $solr;
+    }
+    else {
+      throw new Exception(t('The solr service class @class does not exist.', array('@class' => $class)));
+    }
   }
   return $solr_cache[$host][$port][$path];
 }
