OPENDJ-3286: import-ldif prints missleading message when fail
Makes error messages more meaningful
| | |
| | | |
| | | import static org.opends.messages.UtilityMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static org.opends.messages.BackendMessages.ERR_ADD_ENTRY_ALREADY_EXISTS; |
| | | import static org.opends.messages.BackendMessages.ERR_IMPORT_DUPLICATE_ENTRY; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | |
| | | if (!addPending(entryDN)) |
| | | { |
| | | logger.trace("Skipping entry %s because the DN already exists.", entryDN); |
| | | logToSkipWriter(lines, ERR_ADD_ENTRY_ALREADY_EXISTS.get(entryDN)); |
| | | logToSkipWriter(lines, ERR_IMPORT_DUPLICATE_ENTRY.get(entryDN)); |
| | | continue; |
| | | } |
| | | } |
| | |
| | | totalNumberOfEntries++; |
| | | } |
| | | } |
| | | catch (StorageRuntimeException e) |
| | | { |
| | | // DnValidationCursorDecorator is using a StorageRuntimeException to wrap a DirectoryException |
| | | if (e.getCause() instanceof DirectoryException) |
| | | { |
| | | throw (DirectoryException) e.getCause(); |
| | | } |
| | | throw e; |
| | | } |
| | | id2count.importPutTotalCount(asImporter(id2CountChunk), Math.max(0, totalNumberOfEntries)); |
| | | |
| | | new ChunkCopierTask(reporter, id2CountChunk, id2count.getName(), importer).call(); |
| | |
| | | { |
| | | if (dn.equals(parentDns.peekLast())) |
| | | { |
| | | throw new DirectoryException(ENTRY_ALREADY_EXISTS, ERR_ADD_ENTRY_ALREADY_EXISTS.get(getDnAsString())); |
| | | throw new DirectoryException(ENTRY_ALREADY_EXISTS, ERR_IMPORT_DUPLICATE_ENTRY.get(getDnAsString())); |
| | | } |
| | | } |
| | | |
| | |
| | | logger.traceException(de); |
| | | |
| | | DirectoryServer.notifyImportEnded(backend, importConfig, false); |
| | | if (de.getResultCode().equals(DirectoryServer.getServerErrorResultCode())) |
| | | { |
| | | logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(de.getMessageObject())); |
| | | } |
| | | else |
| | | { |
| | | logger.error(de.getMessageObject()); |
| | | } |
| | | return TaskState.STOPPED_BY_ERROR; |
| | | } |
| | | catch (Exception e) |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | LocalizableMessage msg; |
| | | msg = de.getMessageObject(); |
| | | logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(msg)); |
| | | if (de.getResultCode().equals(DirectoryServer.getServerErrorResultCode())) |
| | | { |
| | | logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(de.getMessageObject())); |
| | | } |
| | | else |
| | | { |
| | | logger.error(de.getMessageObject()); |
| | | } |
| | | retCode = 1; |
| | | } |
| | | catch (Exception e) |
| | |
| | | the import process can start |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=Unable to create the temporary \ |
| | | directory %s |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=The parent entry '%s' does not exist |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=The import has been aborted because the \ |
| | | entry '%s' does not have a parent entry |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=Entry record is not \ |
| | | compatible with this version of the backend database. Entry version: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=An error occurred while \ |
| | |
| | | NOTE_CONFIG_INDEX_CONFIDENTIALITY_REQUIRES_REBUILD_607=Changing confidentiality for index '%s' requires the index \ |
| | | to be rebuilt before it can be used again |
| | | ERR_BACKEND_FAULTY_CRYPTO_TRANSFORMATION_608=Error while enabling confidentiality with cipher %s, %d bits: %s |
| | | ERR_IMPORT_DUPLICATE_ENTRY_609=The import has been aborted because the data to be imported contains duplicate \ |
| | | copies of entry '%s' |
| | |
| | | ERR_IMPORT_LDIF_LACK_MEM_438=Mem\u00f2ria lliure insuficient per realitzar la importaci\u00f3. Com a m\u00ednim es necessiten %dMB de mem\u00f2ria lliure |
| | | ERR_EXECUTION_ERROR_445=error d'execuci\u00f3 durant l'operaci\u00f3 d'infraestructura de fons (backend): %s |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=No es pot crear el directori temporal %s |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=La entrada pare '%s' no existeix |
| | | INFO_CACHE_AND_MEMORY_REPORT_507=Mem\u00f2ria lliure = %d MB, percentatge de p\u00e8rdues de la mem. cache = %.1f/entada{code} |
| | | NOTE_BACKEND_STARTED_513=S'ha iniciat la infraestructura de fons (backend) de la base de dades %s, que cont\u00e9 %d entrades |
| | | NOTE_EXPORT_FINAL_STATUS_515=Exportades %d entrades i omeses %d en %d segons (promig %.1f/sec) |
| | |
| | | ERR_EXPORT_IO_ERROR_468=E/A-Fehler ist beim Exportieren des Eintrags aufgetreten: %s |
| | | ERR_IMPORT_BACKEND_ONLINE_469=Das Backend muss deaktiviert werden, bevor der Importprozess starten kann |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=Das tempor\u00e4re Verzeichnis %s konnte nicht erstellt werden |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=Der \u00fcbergeordnete Eintrag '%s' ist nicht vorhanden |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=Eintragsdatensatz ist nicht kompatibel mit dieser Version der Backend-Datenbank. Eintragsversion: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=Beim Lesen aus Index %s ist ein Fehler aufgetreten. Der Index scheint besch\u00e4digt zu sein und befindet sich derzeit in einem heruntergestuften Betriebszustand. Der Index muss neu erstellt werden, bevor er in den normalen Betriebszustand zur\u00fcckkehren kann |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=Der Wert des Steuerungscookies f\u00fcr die folgenden in Seiten eingeteilten Ergebnisse wurde nicht erkannt: %s |
| | |
| | | ERR_EXPORT_IO_ERROR_468=Se ha producido un error de E/S al exportar la entrada: %s |
| | | ERR_IMPORT_BACKEND_ONLINE_469=Debe inhabilitarse el backend antes de poder iniciar el proceso de importaci\u00f3n |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=No se puede crear el directorio temporal %s |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=La entrada principal '%s' no existe |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=El registro de entrada no es compatible con esta versi\u00f3n de la base de datos de backend. Versi\u00f3n de la entrada: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=Se ha producido un error al leer desde el \u00edndice %s. Parece que el \u00edndice est\u00e1 da\u00f1ado y actualmente est\u00e1 funcionando en un estado degradado. Debe reconstruirse el \u00edndice para que pueda funcionar con normalidad |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=No se ha reconocido el siguiente valor de cookie de control de resultados: %s |
| | |
| | | ERR_EXPORT_IO_ERROR_468=Une erreur d'E/S s'est produite lors de l'exportation de l'entr\u00e9e\u00a0: %s |
| | | ERR_IMPORT_BACKEND_ONLINE_469=Vous devez d\u00e9sactiver le backend avant de lancer le processus d'importation |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=Impossible de cr\u00e9er le r\u00e9pertoire temporaire %s |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=L'entr\u00e9e '%s' parente n'existe pas |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=L'import a \u00e9chou\u00e9 parce que le parent de l'entr\u00e9e "%s" n'\u00e9xiste pas |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=Enregistrement d'entr\u00e9e incompatible avec cette version de la base de donn\u00e9es de backend. Version de l'entr\u00e9e\u00a0: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=Une erreur s'est produite lors de la lecture dans l'index %s. L'index semble corrompu et son fonctionnement se d\u00e9grade. Vous devez reconstruire l'index pour r\u00e9tablir son fonctionnement normal |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=La valeur de cookie de contr\u00f4le des r\u00e9sultats pagin\u00e9s suivante n'est pas reconnue\u00a0: %s |
| | |
| | | ERR_EXPORT_IO_ERROR_468=\u30a8\u30f3\u30c8\u30ea\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u4e2d\u306b I/O \u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s |
| | | ERR_IMPORT_BACKEND_ONLINE_469=\u30a4\u30f3\u30dd\u30fc\u30c8\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u306b\u306f\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u7121\u52b9\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059 |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=\u4e00\u6642\u30c7\u30a3\u30ec\u30af\u30c8\u30ea %s \u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093 |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=\u89aa\u30a8\u30f3\u30c8\u30ea '%s' \u306f\u5b58\u5728\u3057\u307e\u305b\u3093 |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=\u30a8\u30f3\u30c8\u30ea\u30ec\u30b3\u30fc\u30c9\u306f\u3053\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u4e92\u63db\u6027\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30a8\u30f3\u30c8\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 %s \u304b\u3089\u306e\u8aad\u307f\u53d6\u308a\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u58ca\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u73fe\u5728\u3001\u6a5f\u80fd\u4f4e\u4e0b\u72b6\u614b\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6b63\u5e38\u306a\u72b6\u614b\u306b\u623b\u3059\u306b\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u518d\u69cb\u7bc9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059 |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=\u6b21\u306e\u7d50\u679c\u30da\u30fc\u30b8\u30f3\u30b0\u5236\u5fa1 Cookie \u5024\u304c\u8a8d\u8b58\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f: %s |
| | |
| | | ERR_ENTRY_DATABASE_CORRUPT_467=\ud56d\ubaa9 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc544\uc774\ub514 %s\uc5d0 \ub300\ud55c \uc720\ud6a8\ud55c \ub808\ucf54\ub4dc\uac00 \uc5c6\uc2b5\ub2c8\ub2e4. |
| | | ERR_IMPORT_BACKEND_ONLINE_469=\uac00\uc838\uc624\uae30 \ud504\ub85c\uc138\uc2a4\ub97c \uc2dc\uc791\ud558\ub824\uba74 \ubc31\uc5d4\ub4dc\ub97c \ube44\ud65c\uc131\ud654\ud574\uc57c \ud569\ub2c8\ub2e4. |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=\uc784\uc2dc \ub514\ub809\ud1a0\ub9ac %s\uc744(\ub97c) \ub9cc\ub4e4 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=\ubd80\ubaa8 \ud56d\ubaa9 '%s'\uc774(\uac00) \uc5c6\uc2b5\ub2c8\ub2e4. |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=Entry record is not compatible with this version of the backend database. \ud56d\ubaa9 \ubc84\uc804: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=%s \uc0c9\uc778\uc744 \uc77d\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. \uc0c9\uc778\uc774 \uc190\uc0c1\ub41c \uac83 \uac19\uc73c\uba70 \ud604\uc7ac \ub0ae\uc740 \uc131\ub2a5\uc73c\ub85c \uc791\ub3d9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uc0c9\uc778\uc774 \uc815\uc0c1\uc801\uc73c\ub85c \uc791\ub3d9\ud558\ub824\uba74 \uc0c9\uc778\uc744 \ub2e4\uc2dc \uc791\uc131\ud574\uc57c \ud569\ub2c8\ub2e4. |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=\ub2e4\uc74c \ud398\uc774\uc9c0\uc758 \uacb0\uacfc \uc81c\uc5b4 \ucfe0\ud0a4 \uac12\uc774 \uc778\uc2dd\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4: %s |
| | |
| | | ERR_EXPORT_IO_ERROR_468=\u5bfc\u51fa\u6761\u76ee\u65f6\u51fa\u73b0 I/O \u9519\u8bef: %s |
| | | ERR_IMPORT_BACKEND_ONLINE_469=\u5728\u5bfc\u5165\u8fdb\u7a0b\u5f00\u59cb\u4e4b\u524d\uff0c\u5fc5\u987b\u7981\u7528\u540e\u7aef |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=\u65e0\u6cd5\u521b\u5efa\u4e34\u65f6\u76ee\u5f55 %s |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=\u7236\u6761\u76ee '%s' \u4e0d\u5b58\u5728 |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=\u6761\u76ee\u8bb0\u5f55\u4e0e\u6b64\u7248\u672c\u7684\u540e\u7aef\u6570\u636e\u5e93\u4e0d\u517c\u5bb9\u3002\u6761\u76ee\u7248\u672c: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=\u8bfb\u53d6\u7d22\u5f15 %s \u65f6\u51fa\u73b0\u9519\u8bef\u3002\u7d22\u5f15\u4f3c\u4e4e\u5df2\u635f\u574f\uff0c\u5e76\u4e14\u5f53\u524d\u6b63\u4ee5\u964d\u7ea7\u72b6\u6001\u8fd0\u884c\u3002\u5fc5\u987b\u5148\u91cd\u65b0\u751f\u6210\u7d22\u5f15\uff0c\u7136\u540e\u5b83\u624d\u80fd\u91cd\u65b0\u6b63\u5e38\u8fd0\u884c |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=\u65e0\u6cd5\u8bc6\u522b\u4ee5\u4e0b\u5206\u9875\u7ed3\u679c\u63a7\u5236 Cookie \u503c: %s |
| | |
| | | ERR_ENTRY_DATABASE_CORRUPT_467=\u9805\u76ee\u8cc7\u6599\u5eab\u4e0d\u5305\u542b ID %s \u7684\u6709\u6548\u8a18\u9304 |
| | | ERR_IMPORT_BACKEND_ONLINE_469=\u5fc5\u9808\u505c\u7528\u5f8c\u7aef\uff0c\u532f\u5165\u7a0b\u5e8f\u624d\u53ef\u555f\u52d5 |
| | | ERR_IMPORT_CREATE_TMPDIR_ERROR_471=\u7121\u6cd5\u5efa\u7acb\u66ab\u5b58\u76ee\u9304 %s |
| | | ERR_IMPORT_PARENT_NOT_FOUND_481=\u7236\u7cfb\u9805\u76ee\u300c%s\u300d\u4e0d\u5b58\u5728 |
| | | ERR_INCOMPATIBLE_ENTRY_VERSION_482=Entry record is not compatible with this version of the backend database. \u9805\u76ee\u7248\u672c: %x |
| | | ERR_INDEX_CORRUPT_REQUIRES_REBUILD_483=\u8b80\u53d6\u7d22\u5f15 %s \u6642\u767c\u751f\u932f\u8aa4\u3002\u7d22\u5f15\u53ef\u80fd\u5df2\u6bc0\u58de\uff0c\u4e14\u76ee\u524d\u4ee5\u964d\u7d1a\u72c0\u614b\u904b\u4f5c\u3002\u7d22\u5f15\u5fc5\u9808\u91cd\u5efa\u624d\u53ef\u56de\u5fa9\u6b63\u5e38\u904b\u4f5c |
| | | ERR_INVALID_PAGED_RESULTS_COOKIE_484=\u7121\u6cd5\u8fa8\u8b58\u4e0b\u5217\u5206\u9801\u986f\u793a\u7684\u7d50\u679c\u63a7\u5236 cookie \u503c: %s |