diff --git a/.bazelversion b/.bazelversion
index fd2a018..7c69a55 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-3.1.0
+3.7.0
diff --git a/WORKSPACE b/WORKSPACE
index 27db984..c42a339 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,26 +3,15 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "6c39deb06f58bb62162ccb6865964f531739f512",
+    commit = "a029d8e41d6211c8b23052aa0a0c2c7649577e85",
     #local_path = "/home/<user>/projects/bazlets",
 )
 
-# Snapshot Plugin API
-#load(
-#    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
-#    "gerrit_api_maven_local",
-#)
-
-# Load snapshot Plugin API
-#gerrit_api_maven_local()
-
-# Release Plugin API
 load(
     "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
     "gerrit_api",
 )
 
-# Load release Plugin API
 gerrit_api()
 
 load("//:external_plugin_deps.bzl", "external_plugin_deps")
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/LockUnlockProject.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/LockUnlockProject.java
index 04426bc..170e0d6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/LockUnlockProject.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/LockUnlockProject.java
@@ -28,17 +28,22 @@
 public class LockUnlockProject {
   private final MetaDataUpdate.Server metaDataUpdateFactory;
   private final ProjectCache projectCache;
+  private final ProjectConfig.Factory projectConfigFactory;
 
   @Inject
-  LockUnlockProject(MetaDataUpdate.Server metaDataUpdateFactory, ProjectCache projectCache) {
+  LockUnlockProject(
+      MetaDataUpdate.Server metaDataUpdateFactory,
+      ProjectCache projectCache,
+      ProjectConfig.Factory projectConfigFactory) {
     this.metaDataUpdateFactory = metaDataUpdateFactory;
     this.projectCache = projectCache;
+    this.projectConfigFactory = projectConfigFactory;
   }
 
   public void lock(Project.NameKey key) throws IOException, ConfigInvalidException {
     MetaDataUpdate md = metaDataUpdateFactory.create(key);
 
-    ProjectConfig projectConfig = ProjectConfig.read(md);
+    ProjectConfig projectConfig = projectConfigFactory.read(md);
     Project p = projectConfig.getProject();
     p.setState(ProjectState.READ_ONLY);
 
@@ -50,7 +55,7 @@
   public void unlock(Project.NameKey key) throws IOException, ConfigInvalidException {
     MetaDataUpdate md = metaDataUpdateFactory.create(key);
 
-    ProjectConfig projectConfig = ProjectConfig.read(md);
+    ProjectConfig projectConfig = projectConfigFactory.read(md);
     Project p = projectConfig.getProject();
     p.setState(ProjectState.ACTIVE);
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameCommand.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameCommand.java
index 50f86d7..9883858 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameCommand.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameCommand.java
@@ -22,11 +22,10 @@
 import com.google.gerrit.reviewdb.client.Change;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.CurrentUser;
-import com.google.gerrit.server.project.ProjectCache;
 import com.google.gerrit.server.project.ProjectResource;
+import com.google.gerrit.server.project.ProjectState;
 import com.google.gerrit.sshd.CommandMetaData;
 import com.google.gerrit.sshd.SshCommand;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.googlesource.gerrit.plugins.renameproject.monitor.CommandProgressMonitor;
@@ -44,7 +43,7 @@
 @CommandMetaData(name = "rename", description = "Rename project")
 public final class RenameCommand extends SshCommand {
   @Argument(index = 0, required = true, metaVar = "OLDPROJECT", usage = "project to rename")
-  private String projectControl;
+  private ProjectState projectState;
 
   @Argument(index = 1, required = true, metaVar = "NEWNAME", usage = "new name for the project")
   private String newProjectName;
@@ -54,16 +53,11 @@
 
   private static final Logger log = LoggerFactory.getLogger(RenameCommand.class);
   private final RenameProject renameProject;
-  private final Provider<ProjectCache> projectCacheProvider;
   private final Provider<CurrentUser> self;
 
   @Inject
-  protected RenameCommand(
-      RenameProject renameProject,
-      Provider<ProjectCache> projectCacheProvider,
-      Provider<CurrentUser> self) {
+  protected RenameCommand(RenameProject renameProject, Provider<CurrentUser> self) {
     this.renameProject = renameProject;
-    this.projectCacheProvider = projectCacheProvider;
     this.self = self;
   }
 
@@ -72,18 +66,12 @@
     try {
       RenameProject.Input input = new RenameProject.Input();
       input.name = newProjectName;
-      ProjectResource rsrc =
-          new ProjectResource(
-              projectCacheProvider.get().get(new Project.NameKey(projectControl)), self.get());
-
-      if (rsrc.getProjectState() == null) {
-        throw new CannotRenameProjectException("Project does not exist");
-      }
+      ProjectResource rsrc = new ProjectResource(projectState, self.get());
 
       if (replication) {
         if (renameProject.isAdmin()) {
           renameProject.fsRenameStep(
-              rsrc.getNameKey(), new Project.NameKey(newProjectName), Optional.empty());
+              rsrc.getNameKey(), Project.nameKey(newProjectName), Optional.empty());
         } else {
           throw new AuthException("Not allowed to replicate rename");
         }
@@ -100,7 +88,7 @@
           }
         }
       }
-    } catch (RestApiException | OrmException | IOException | CannotRenameProjectException e) {
+    } catch (RestApiException | IOException e) {
       throw die(e);
     }
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLog.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLog.java
index 88c0e3b..6449cba 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLog.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLog.java
@@ -17,10 +17,10 @@
 import com.google.common.collect.ListMultimap;
 import com.google.common.collect.MultimapBuilder;
 import com.google.gerrit.extensions.systemstatus.ServerInformation;
+import com.google.gerrit.json.OutputFormat;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.AuditEvent;
 import com.google.gerrit.server.IdentifiedUser;
-import com.google.gerrit.server.OutputFormat;
 import com.google.gerrit.server.audit.AuditService;
 import com.google.gerrit.server.util.PluginLogFile;
 import com.google.gerrit.server.util.SystemLog;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLogLayout.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLogLayout.java
index 5a11a17..053e8b9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLogLayout.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameLogLayout.java
@@ -33,8 +33,8 @@
    * +0100] INFO 1000000 admin OK \ myProject {"name": newName}
    *
    * <p>The log entry for a failed project rename will look like this: [2015-03-05 12:14:30,180
-   * +0100] ERROR 1000000 admin FAIL \ myProject {"name": newName}
-   * com.google.gwtorm.server.OrmException: \ Failed to access the database
+   * +0100] ERROR 1000000 admin FAIL \ myProject {"name": newName} TODO(mmiller): \ Failed to access
+   * the database
    */
   @Override
   public String format(LoggingEvent event) {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
index 2cbe0e4..aae93b2 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameProject.java
@@ -28,6 +28,7 @@
 import com.google.gerrit.extensions.restapi.Response;
 import com.google.gerrit.extensions.restapi.RestModifyView;
 import com.google.gerrit.reviewdb.client.Change;
+import com.google.gerrit.reviewdb.client.Change.Id;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.IdentifiedUser;
@@ -37,7 +38,6 @@
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.permissions.ProjectPermission;
 import com.google.gerrit.server.project.ProjectResource;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -66,9 +66,9 @@
   @Override
   public Object apply(ProjectResource resource, Input input)
       throws IOException, AuthException, BadRequestException, ResourceConflictException,
-          InterruptedException, ConfigInvalidException, OrmException {
+          InterruptedException, ConfigInvalidException, RenameRevertException {
     assertCanRename(resource, input, Optional.empty());
-    List<Change.Id> changeIds = getChanges(resource, Optional.empty());
+    List<Id> changeIds = getChanges(resource, Optional.empty());
 
     if (changeIds == null || changeIds.size() <= WARNING_LIMIT || input.continueWithRename) {
       doRename(changeIds, resource, input, Optional.empty());
@@ -205,7 +205,7 @@
 
   void doRename(
       List<Change.Id> changeIds, ProjectResource rsrc, Input input, Optional<ProgressMonitor> pm)
-      throws InterruptedException, OrmException, ConfigInvalidException, IOException {
+      throws InterruptedException, ConfigInvalidException, IOException, RenameRevertException {
     Project.NameKey oldProjectKey = rsrc.getNameKey();
     Project.NameKey newProjectKey = new Project.NameKey(input.name);
     Exception ex = null;
@@ -276,9 +276,8 @@
       Project.NameKey oldProjectKey,
       Project.NameKey newProjectKey,
       Optional<ProgressMonitor> pm)
-      throws OrmException {
-    List<Change.Id> updatedChangeIds =
-        dbHandler.rename(changeIds, oldProjectKey, newProjectKey, pm);
+      throws IOException, ConfigInvalidException, RenameRevertException {
+    List<Change.Id> updatedChangeIds = dbHandler.rename(changeIds, newProjectKey, pm);
     logPerformedStep(Step.DATABASE, newProjectKey, oldProjectKey);
     return updatedChangeIds;
   }
@@ -324,7 +323,7 @@
   }
 
   List<Change.Id> getChanges(ProjectResource rsrc, Optional<ProgressMonitor> opm)
-      throws OrmException, IOException {
+      throws IOException {
     opm.ifPresent(pm -> pm.beginTask("Retrieving the list of changes from DB"));
     Project.NameKey oldProjectKey = rsrc.getNameKey();
     return dbHandler.getChangeIds(oldProjectKey);
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameRevertException.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameRevertException.java
index 0cb6256..b0e467a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameRevertException.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RenameRevertException.java
@@ -13,10 +13,8 @@
 // limitations under the License.
 package com.googlesource.gerrit.plugins.renameproject;
 
-import com.google.gwtorm.server.OrmException;
-
 /** Add cause for exception during revert operation */
-public class RenameRevertException extends OrmException {
+public class RenameRevertException extends Exception {
   private static final long serialVersionUID = 1L;
 
   public RenameRevertException(Throwable revertException, Throwable cause) {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RevertRenameProject.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RevertRenameProject.java
index 4d61a49..0671c71 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/RevertRenameProject.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/RevertRenameProject.java
@@ -17,7 +17,6 @@
 import com.google.gerrit.reviewdb.client.Change;
 import com.google.gerrit.reviewdb.client.Change.Id;
 import com.google.gerrit.reviewdb.client.Project;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.googlesource.gerrit.plugins.renameproject.RenameProject.Step;
 import com.googlesource.gerrit.plugins.renameproject.cache.CacheRenameHandler;
@@ -29,6 +28,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Optional;
+import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -58,7 +58,7 @@
       Project.NameKey oldProjectKey,
       Project.NameKey newProjectKey,
       Optional<ProgressMonitor> opm)
-      throws IOException, OrmException {
+      throws IOException, RenameRevertException, ConfigInvalidException {
     opm.ifPresent(pm -> pm.beginTask("Reverting the rename procedure."));
     List<Change.Id> updatedChangeIds = Collections.emptyList();
     if (stepsPerformed.contains(Step.FILESYSTEM)) {
@@ -77,12 +77,12 @@
     }
     if (stepsPerformed.contains(Step.DATABASE)) {
       try {
-        updatedChangeIds = dbHandler.rename(changeIds, newProjectKey, oldProjectKey, opm);
+        updatedChangeIds = dbHandler.rename(changeIds, newProjectKey, opm);
         log.debug(
             "Reverted the changes in DB successfully from project {} to project {}.",
             newProjectKey.get(),
             oldProjectKey.get());
-      } catch (OrmException e) {
+      } catch (RenameRevertException | ConfigInvalidException e) {
         log.error(
             "Failed to revert changes in DB for project {}. Secondary indexes not reverted. Exception caught: {}",
             oldProjectKey.get(),
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions/RenamePreconditions.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions/RenamePreconditions.java
index 9efa51d..3e30f6e 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions/RenamePreconditions.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/conditions/RenamePreconditions.java
@@ -28,7 +28,6 @@
 import com.google.gerrit.server.submit.MergeOpRepoManager;
 import com.google.gerrit.server.submit.SubmoduleException;
 import com.google.gerrit.server.submit.SubmoduleOp;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -102,7 +101,7 @@
         log.error(message);
         throw new CannotRenameProjectException(message);
       }
-    } catch (PermissionBackendException | OrmException | RestApiException e) {
+    } catch (PermissionBackendException | RestApiException e) {
       throw new CannotRenameProjectException(e);
     }
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/DatabaseRenameHandler.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/DatabaseRenameHandler.java
index d19f792..2ed4ad5 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/DatabaseRenameHandler.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/DatabaseRenameHandler.java
@@ -19,7 +19,6 @@
 import com.google.gerrit.reviewdb.client.Account;
 import com.google.gerrit.reviewdb.client.Change;
 import com.google.gerrit.reviewdb.client.Project;
-import com.google.gerrit.reviewdb.server.ReviewDb;
 import com.google.gerrit.server.ServerInitiated;
 import com.google.gerrit.server.account.AccountState;
 import com.google.gerrit.server.account.AccountsUpdate;
@@ -28,21 +27,13 @@
 import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.notedb.ChangeNotes;
 import com.google.gerrit.server.notedb.ChangeNotes.Factory.ChangeNotesResult;
-import com.google.gerrit.server.notedb.NotesMigration;
 import com.google.gerrit.server.query.account.InternalAccountQuery;
-import com.google.gwtorm.jdbc.JdbcSchema;
-import com.google.gwtorm.server.OrmException;
-import com.google.gwtorm.server.SchemaFactory;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
 import com.googlesource.gerrit.plugins.renameproject.RenameRevertException;
 import com.googlesource.gerrit.plugins.renameproject.monitor.ProgressMonitor;
 import java.io.IOException;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -59,69 +50,37 @@
 public class DatabaseRenameHandler {
   private static final Logger log = LoggerFactory.getLogger(DatabaseRenameHandler.class);
 
-  private final SchemaFactory<ReviewDb> schemaFactory;
-  private final ChangeNotes.Factory schemaFactoryNoteDb;
+  private final ChangeNotes.Factory schemaFactory;
   private final GitRepositoryManager repoManager;
   private final Provider<InternalAccountQuery> accountQueryProvider;
   private final Provider<AccountsUpdate> accountsUpdateProvider;
-  private NotesMigration migration;
+
+  private Project.NameKey oldProjectKey;
 
   @Inject
   public DatabaseRenameHandler(
-      SchemaFactory<ReviewDb> schemaFactory,
-      ChangeNotes.Factory schemaFactoryNoteDb,
+      ChangeNotes.Factory schemaFactory,
       GitRepositoryManager repoManager,
-      NotesMigration migration,
       Provider<InternalAccountQuery> accountQueryProvider,
       @ServerInitiated Provider<AccountsUpdate> accountsUpdateProvider) {
     this.accountQueryProvider = accountQueryProvider;
     this.schemaFactory = schemaFactory;
-    this.schemaFactoryNoteDb = schemaFactoryNoteDb;
     this.repoManager = repoManager;
     this.accountsUpdateProvider = accountsUpdateProvider;
-    this.migration = migration;
   }
 
-  public List<Change.Id> getChangeIds(Project.NameKey oldProjectKey)
-      throws OrmException, IOException {
+  public List<Change.Id> getChangeIds(Project.NameKey oldProjectKey) throws IOException {
     log.debug("Starting to retrieve changes from the DB for project {}", oldProjectKey.get());
-    ReviewDb db = schemaFactory.open();
-    return (isNoteDb())
-        ? getChangeIdsFromNoteDb(oldProjectKey, db)
-        : getChangeIdsFromReviewDb(oldProjectKey, db);
-  }
+    this.oldProjectKey = oldProjectKey;
 
-  private List<Change.Id> getChangeIdsFromReviewDb(Project.NameKey oldProjectKey, ReviewDb db)
-      throws OrmException {
-    List<Change.Id> changeIds = new ArrayList<>();
-    String query =
-        "select change_id from changes where dest_project_name ='" + oldProjectKey.get() + "';";
-    try (Connection conn = ((JdbcSchema) db).getConnection();
-        Statement stmt = conn.createStatement();
-        ResultSet changes = stmt.executeQuery(query)) {
-      while (changes != null && changes.next()) {
-        Change.Id changeId = new Change.Id(changes.getInt(1));
-        changeIds.add(changeId);
-      }
-      log.debug(
-          "Number of changes in reviewDb related to project {} are {}",
-          oldProjectKey.get(),
-          changeIds.size());
-      return changeIds;
-    } catch (SQLException e) {
-      throw new OrmException(e);
-    }
-  }
-
-  private List<Change.Id> getChangeIdsFromNoteDb(Project.NameKey oldProjectKey, ReviewDb db)
-      throws IOException {
     List<Change.Id> changeIds = new ArrayList<>();
     Stream<ChangeNotesResult> changes =
-        schemaFactoryNoteDb.scan(repoManager.openRepository(oldProjectKey), db, oldProjectKey);
+        schemaFactory.scan(repoManager.openRepository(oldProjectKey), oldProjectKey);
     Iterator<ChangeNotesResult> iterator = changes.iterator();
     while (iterator.hasNext()) {
       ChangeNotesResult change = iterator.next();
-      changeIds.add(change.id());
+      Change.Id changeId = change.id();
+      changeIds.add(changeId);
     }
     log.debug(
         "Number of changes in noteDb related to project {} are {}",
@@ -130,101 +89,21 @@
     return changeIds;
   }
 
-  private boolean isNoteDb() {
-    return migration.disableChangeReviewDb();
-  }
-
   public List<Change.Id> rename(
-      List<Change.Id> changes,
-      Project.NameKey oldProjectKey,
-      Project.NameKey newProjectKey,
-      Optional<ProgressMonitor> opm)
-      throws OrmException, RenameRevertException {
+      List<Change.Id> changes, Project.NameKey newProjectKey, Optional<ProgressMonitor> opm)
+      throws RenameRevertException, IOException, ConfigInvalidException {
     opm.ifPresent(pm -> pm.beginTask("Updating changes in the database"));
-    ReviewDb db = schemaFactory.open();
-    return (isNoteDb())
-        ? renameInNoteDb(changes, oldProjectKey, newProjectKey)
-        : renameInReviewDb(changes, oldProjectKey, newProjectKey, db);
-  }
-
-  private List<Change.Id> renameInReviewDb(
-      List<Change.Id> changes,
-      Project.NameKey oldProjectKey,
-      Project.NameKey newProjectKey,
-      ReviewDb db)
-      throws OrmException {
-    try (Connection conn = ((JdbcSchema) db).getConnection();
-        Statement stmt = conn.createStatement()) {
-      conn.setAutoCommit(false);
-      try {
-        try {
-          log.debug("Updating the changes in reviewDb related to project {}", oldProjectKey.get());
-          for (Change.Id cd : changes) {
-            stmt.addBatch(
-                "update changes set dest_project_name='"
-                    + newProjectKey.get()
-                    + "' where change_id ="
-                    + cd.id
-                    + ";");
-          }
-          stmt.executeBatch();
-          conn.commit();
-        } catch (SQLException e) {
-          throw new OrmException(e);
-        }
-        updateWatchEntries(oldProjectKey, newProjectKey);
-        log.debug(
-            "Successfully updated the changes in reviewDb related to project {}",
-            oldProjectKey.get());
-        return changes;
-      } catch (OrmException e) {
-        try {
-          log.error(
-              "Failed to update changes in reviewDb for project {}, exception caught: {}. Rolling back the operation.",
-              oldProjectKey.get(),
-              e.toString());
-          conn.rollback();
-        } catch (SQLException revertEx) {
-          log.error(
-              "Failed to rollback changes in reviewDb from project {} to project {}, exception caught: {}",
-              newProjectKey.get(),
-              oldProjectKey.get(),
-              revertEx.toString());
-          throw new RenameRevertException(revertEx, e);
-        }
-        try {
-          updateWatchEntries(newProjectKey, oldProjectKey);
-        } catch (OrmException revertEx) {
-          log.error(
-              "Failed to update watched changes in reviewDb from project {} to project {}, exception caught: {}",
-              newProjectKey.get(),
-              oldProjectKey.get(),
-              revertEx.toString());
-          throw new RenameRevertException(revertEx, e);
-        }
-        throw e;
-      } finally {
-        conn.setAutoCommit(true);
-      }
-    } catch (SQLException e) {
-      throw new OrmException(e);
-    }
-  }
-
-  private List<Change.Id> renameInNoteDb(
-      List<Change.Id> changes, Project.NameKey oldProjectKey, Project.NameKey newProjectKey)
-      throws OrmException {
     log.debug("Updating the changes in noteDb related to project {}", oldProjectKey.get());
     try {
-      updateWatchEntries(oldProjectKey, newProjectKey);
-    } catch (OrmException e) {
+      updateWatchEntries(newProjectKey);
+    } catch (Exception e) {
       log.error(
           "Failed to update changes in noteDb for project {}, exception caught: {}. Rolling back the operation.",
           oldProjectKey.get(),
           e.toString());
       try {
-        updateWatchEntries(newProjectKey, oldProjectKey);
-      } catch (OrmException revertEx) {
+        updateWatchEntries(newProjectKey);
+      } catch (Exception revertEx) {
         log.error(
             "Failed to rollback changes in noteDb from project {} to project {}, exception caught: {}",
             newProjectKey.get(),
@@ -240,8 +119,8 @@
     return changes;
   }
 
-  private void updateWatchEntries(Project.NameKey oldProjectKey, Project.NameKey newProjectKey)
-      throws OrmException {
+  private void updateWatchEntries(Project.NameKey newProjectKey)
+      throws IOException, ConfigInvalidException {
     for (AccountState a : accountQueryProvider.get().byWatchedProject(oldProjectKey)) {
       Account.Id accountId = a.getAccount().getId();
       ImmutableMap<ProjectWatchKey, ImmutableSet<NotifyType>> projectWatches =
@@ -275,14 +154,14 @@
                 a.getUserName(),
                 newProjectKey.get(),
                 e);
-            throw new OrmException(e);
+            throw e;
           } catch (IOException e) {
             log.error(
                 "Updating watch entry for user {} in project {} failed.",
                 a.getUserName(),
                 newProjectKey.get(),
                 e);
-            throw new OrmException(e);
+            throw e;
           }
         }
       }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/IndexUpdateHandler.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/IndexUpdateHandler.java
index 37745ff..f75b784 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/IndexUpdateHandler.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/database/IndexUpdateHandler.java
@@ -17,15 +17,11 @@
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.google.gerrit.reviewdb.client.Change;
 import com.google.gerrit.reviewdb.client.Project;
-import com.google.gerrit.reviewdb.server.ReviewDb;
 import com.google.gerrit.server.index.change.ChangeIndexer;
-import com.google.gwtorm.server.OrmException;
-import com.google.gwtorm.server.SchemaFactory;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 import com.googlesource.gerrit.plugins.renameproject.Configuration;
 import com.googlesource.gerrit.plugins.renameproject.monitor.ProgressMonitor;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -41,14 +37,11 @@
 public class IndexUpdateHandler {
   private static final Logger log = LoggerFactory.getLogger(IndexUpdateHandler.class);
 
-  private final SchemaFactory<ReviewDb> schemaFactory;
   private final ChangeIndexer indexer;
   private final Configuration config;
 
   @Inject
-  public IndexUpdateHandler(
-      SchemaFactory<ReviewDb> schemaFactory, ChangeIndexer indexer, Configuration config) {
-    this.schemaFactory = schemaFactory;
+  public IndexUpdateHandler(ChangeIndexer indexer, Configuration config) {
     this.indexer = indexer;
     this.config = config;
   }
@@ -102,14 +95,9 @@
 
     @Override
     public Boolean call() throws Exception {
-      try (ReviewDb db = schemaFactory.open()) {
-        indexer.index(db, newProjectKey, changeId);
-        monitor.ifPresent(monitor -> monitor.update(1));
-        return Boolean.TRUE;
-      } catch (OrmException | IOException e) {
-        log.error("Failed to reindex change {} from index, Cause: {}", changeId, e);
-        throw e;
-      }
+      indexer.index(newProjectKey, changeId);
+      monitor.ifPresent(monitor -> monitor.update(1));
+      return Boolean.TRUE;
     }
   }
 }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/renameproject/RenameIT.java b/src/test/java/com/googlesource/gerrit/plugins/renameproject/RenameIT.java
index a9bea02..41c36d3 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/renameproject/RenameIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/renameproject/RenameIT.java
@@ -29,6 +29,7 @@
 import com.google.gerrit.acceptance.TestPlugin;
 import com.google.gerrit.acceptance.UseLocalDisk;
 import com.google.gerrit.acceptance.UseSsh;
+import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
 import com.google.gerrit.extensions.client.ProjectWatchInfo;
 import com.google.gerrit.reviewdb.client.Change.Id;
 import com.google.gerrit.reviewdb.client.Project;
@@ -57,6 +58,8 @@
   private static final String REPLICATION_OPTION = "--replication";
   private static final String URL = "ssh://localhost:29418";
 
+  @Inject private RequestScopeOperations requestScopeOperations;
+
   @Inject
   @Named(CACHE_NAME)
   private Cache<Id, String> changeIdProjectCache;
@@ -135,7 +138,7 @@
     adminSshSession.exec(
         PLUGIN_NAME + " " + NON_EXISTING_NAME + " " + project.get() + " " + REPLICATION_OPTION);
 
-    assertThat(adminSshSession.getError()).contains("Project does not exist");
+    assertThat(adminSshSession.getError()).contains("project " + NON_EXISTING_NAME + " not found");
     adminSshSession.assertFailure();
   }
 
@@ -145,19 +148,20 @@
     createChange();
     adminSshSession.exec(PLUGIN_NAME + " " + NON_EXISTING_NAME + " " + project.get());
 
-    assertThat(adminSshSession.getError()).contains("Project does not exist");
+    assertThat(adminSshSession.getError()).contains("project " + NON_EXISTING_NAME + " not found");
     adminSshSession.assertFailure();
   }
 
   @Test
   @UseLocalDisk
   public void testRenameSubscribedFail() throws Exception {
-    NameKey superProject = createProject("super-project");
+    NameKey superProject = createProjectOverAPI("super-project", null, true, null);
     TestRepository<?> superRepo = cloneProject(superProject);
-    NameKey subProject = createProject("subscribed-to-project");
+    NameKey subProject = createProjectOverAPI("subscribed-to-project", null, true, null);
     SubmoduleUtil.allowSubmoduleSubscription(
         metaDataUpdateFactory,
         projectCache,
+        projectConfigFactory,
         subProject,
         "refs/heads/master",
         superProject,
@@ -231,10 +235,10 @@
     RestResponse r = renameProjectTo(NEW_PROJECT_NAME);
     r.assertOK();
 
-    ProjectState projectState = projectCache.get(new Project.NameKey(NEW_PROJECT_NAME));
+    ProjectState projectState = projectCache.get(Project.nameKey(NEW_PROJECT_NAME));
     assertThat(projectState).isNotNull();
     assertThat(queryProvider.get().byProject(project)).isEmpty();
-    assertThat(queryProvider.get().byProject(new Project.NameKey(NEW_PROJECT_NAME))).isNotEmpty();
+    assertThat(queryProvider.get().byProject(Project.nameKey(NEW_PROJECT_NAME))).isNotEmpty();
   }
 
   @Test
@@ -245,12 +249,12 @@
     RestResponse r = renameProjectTo(newProjectName);
     r.assertBadRequest();
 
-    ProjectState projectState = projectCache.get(new Project.NameKey(newProjectName));
+    ProjectState projectState = projectCache.get(Project.nameKey(newProjectName));
     assertThat(projectState).isNull();
   }
 
   private RestResponse renameProjectTo(String newName) throws Exception {
-    setApiUser(user);
+    requestScopeOperations.setApiUser(user.id());
     sender.clear();
     String endPoint = "/projects/" + project.get() + "/" + PLUGIN_NAME + "~rename";
     Input i = new Input();
diff --git a/src/test/java/com/googlesource/gerrit/plugins/renameproject/SubmoduleUtil.java b/src/test/java/com/googlesource/gerrit/plugins/renameproject/SubmoduleUtil.java
index e6fcdd1..68515c4 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/renameproject/SubmoduleUtil.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/renameproject/SubmoduleUtil.java
@@ -45,6 +45,7 @@
   static void allowSubmoduleSubscription(
       Server metaDataUpdateFactory,
       ProjectCache projectCache,
+      ProjectConfig.Factory projectConfigFactory,
       NameKey sub,
       String subBranch,
       NameKey superName,
@@ -54,7 +55,7 @@
     try (MetaDataUpdate md = metaDataUpdateFactory.create(sub)) {
       md.setMessage("Added superproject subscription");
       SubscribeSection s;
-      ProjectConfig pc = ProjectConfig.read(md);
+      ProjectConfig pc = projectConfigFactory.read(md);
       if (pc.getSubscribeSections().containsKey(superName)) {
         s = pc.getSubscribeSections().get(superName);
       } else {
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/renameproject/scenarios/RenameProject.scala b/src/test/scala/com/googlesource/gerrit/plugins/renameproject/scenarios/RenameProject.scala
index 744f245..36665ee 100644
--- a/src/test/scala/com/googlesource/gerrit/plugins/renameproject/scenarios/RenameProject.scala
+++ b/src/test/scala/com/googlesource/gerrit/plugins/renameproject/scenarios/RenameProject.scala
@@ -23,18 +23,18 @@
 
 class RenameProject extends GerritSimulation {
   private val data: FeederBuilder = jsonFile(resource).convert(keys).queue
-  private val default = name
-  private val renamedTo = unique
+  private val projectName = className
+  private val renamedTo = uniqueName
 
   override def replaceOverride(in: String): String = {
-    val next = replaceKeyWith("_project", default, in)
+    val next = replaceKeyWith("_project", projectName, in)
     replaceKeyWith("_renamed", renamedTo, next)
   }
 
-  private val createProject = new CreateProject(default)
+  private val createProject = new CreateProject(projectName)
   private val deleteProject = new DeleteProject(renamedTo)
 
-  private val test: ScenarioBuilder = scenario(unique)
+  private val test: ScenarioBuilder = scenario(uniqueName)
     .feed(data)
     .exec(httpRequest.body(ElFileBody(body)).asJson)
 
