From f67af7588ba1f7827bc6ff907729d14bf39a19f6 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Wed, 04 Jun 2008 17:24:01 +0000
Subject: [PATCH] Fix for issues 3255, 3265, and 3269:

---
 opends/src/server/org/opends/server/backends/jeb/ID2Entry.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java b/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
index 9378e9b..e054633 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
@@ -35,6 +35,7 @@
 
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.Entry;
+import org.opends.server.core.DirectoryServer;
 
 /**
  * Represents the database containing the LDAP entries. The database key is
@@ -213,11 +214,11 @@
    * @param id The desired entry ID which forms the key.
    * @param lockMode The JE locking mode to be used for the read.
    * @return The requested entry, or null if there is no such record.
-   * @throws JebException If an error occurs in the JE backend.
+   * @throws DirectoryException If a problem occurs while getting the entry.
    * @throws DatabaseException If an error occurs in the JE database.
    */
   public Entry get(Transaction txn, EntryID id, LockMode lockMode)
-       throws JebException, DatabaseException
+       throws DirectoryException, DatabaseException
   {
     DatabaseEntry key = id.getDatabaseEntry();
     DatabaseEntry data = new DatabaseEntry();
@@ -248,7 +249,8 @@
         catch (Exception e)
         {
           Message message = ERR_JEB_ENTRY_DATABASE_CORRUPT.get(id.toString());
-          throw new JebException(message);
+          throw new DirectoryException(
+              DirectoryServer.getServerErrorResultCode(), message);
         }
         break;
 
@@ -257,7 +259,8 @@
       default   :
         Message message =
             ERR_JEB_INCOMPATIBLE_ENTRY_VERSION.get(id.toString(), entryVersion);
-        throw new JebException(message);
+        throw new DirectoryException(
+              DirectoryServer.getServerErrorResultCode(), message);
     }
 
     if (entry != null)

--
Gitblit v1.10.0