{"record":{"id":"7001fbe4e5574944","repo":"pentaho/pentaho-kettle","slug":"purrepository-fileupdateexception","errorCode":"PurRepository.fileUpdateException","errorMessage":"PurRepository.fileUpdateException (localized, takes file name; error updating file)","messagePattern":"PurRepository\\.fileUpdateException \\(localized, takes file name; error updating file\\)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":3480,"sourceCode":"        }\n      } finally {\n        readWriteLock.readLock().unlock();\n      }\n\n      readWriteLock.writeLock().lock();\n      try {\n        // update title and description\n        file =\n          new RepositoryFile.Builder( file ).title( RepositoryFile.DEFAULT_LOCALE, element.getName() ).createdDate(\n            versionDate != null ? versionDate.getTime() : new Date() ).description( RepositoryFile.DEFAULT_LOCALE,\n            Const.NVL( element.getDescription(), \"\" ) ).build();\n\n        file =\n          pur.updateFile( file, new NodeRepositoryFileData( objectTransformer.elementToDataNode( element ) ),\n            versionComment );\n      } catch ( SOAPFaultException e ) {\n        if ( e.getMessage().contains( UnifiedRepositoryUpdateFileException.PREFIX ) ) {\n          throw new KettleException(\n            BaseMessages.getString( PKG, \"PurRepository.fileUpdateException\", file.getName() ) );\n        }\n        throw e;\n      } finally {\n        readWriteLock.writeLock().unlock();\n      }\n\n      if ( checkRename && isRenamed( element, file ) ) {\n        renameKettleEntity( element, null, element.getName() );\n      }\n    } else {\n\n      int dataSize = calculateDataSize( element );\n\n      readWriteLock.writeLock().lock();\n      try {\n        file =\n          new RepositoryFile.Builder( checkAndSanitize( element.getName()","sourceCodeStart":3462,"sourceCodeEnd":3498,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L3462-L3498","documentation":"When updating an existing file, a SOAPFaultException carrying UnifiedRepositoryUpdateFileException.PREFIX indicates the server rejected the file update. PurRepository rewraps it as a localized 'error updating file' KettleException including the file name. Common server-side causes: version conflicts, name collisions, or permission problems during update.","triggerScenarios":"pur.updateFile(...) throws SOAPFaultException whose message contains UnifiedRepositoryUpdateFileException.PREFIX — i.e. the backend UnifiedRepository explicitly signaled an update failure.","commonSituations":"Concurrent modification of the same file by two users (version conflict); renaming an update to a name already used in the folder; losing write permission on the target file; repository server versioning/jcr issues.","solutions":["Check the server logs for the underlying UnifiedRepositoryUpdateFileException cause to see the real reason","Retry after resolving the conflict (refresh/reload the latest file version)","Ensure the user has write permission on the file and its folder","If the update collides with an existing name, use Save As with a unique name"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  repository.save(element, comment, null, true);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"error updating\")) {\n    log.error(\"Update failed for \" + element.getName(), e);\n    // reload latest version and retry, or Save As\n  } else throw e;\n}","preventionTips":["Reload the latest file version before updating to avoid conflicts","Confirm write permissions on the file","Serialize updates among collaborators rather than concurrent saves"],"tags":["kettle","pentaho","repository","soap","file-update"],"backgroundTag":"database-write-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}