pentaho/pentaho-kettle · error · RepositoryClientException
Client error creating folder
Error message
Client error creating folder
What it means
createFolder() wraps any JAX-RS WebApplicationException or ProcessingException raised while PUTting to the folder-creation service into RepositoryClientException("Client error creating folder"). It means the HTTP client-side call itself failed (connection problem, bad request, server 4xx/5xx surfaced as an exception).
Solutions
- Inspect the wrapped cause (getCause()) to distinguish connection vs. HTTP-status failures
- Verify the server URL, port, and network reachability (curl the service endpoint)
- Ensure the parent folder path exists and the user has create permissions on the server
- Check authentication credentials - a 401/403 from the server surfaces here
Example fix
// before
client.createFolder( new String[]{"a","b"} ); // parent 'a' missing -> exception
// after
RepositoryFileTreeDto root = client.getRoot();
client.createFolder( new String[]{"a"} );
if ( client.getFileInfo( new String[]{"a"} ).isPresent() ) {
client.createFolder( new String[]{"a","b"} );
} Defensive patterns
Strategy: try-catch
Validate before calling
// Preflight: server reachable and parent exists
try ( Response r = client.target( url + "/api/" ).request().get() ) {
if ( r.getStatus() != 200 ) throw new IllegalStateException( "Server unreachable, status " + r.getStatus() );
}
boolean parentExists = client.getFileInfo( parentPath ).isPresent(); Type guard
boolean canCreateFolder( RepositoryClient c, String[] path ) {
return c.getFileInfo( Arrays.copyOf( path, path.length - 1 ) ).isPresent();
} Try / catch
try {
client.createFolder( path );
} catch ( RepositoryClientException e ) {
Throwable cause = e.getCause();
log.error( "Folder creation failed: {} (cause: {})", e.getMessage(), cause );
if ( cause instanceof ProcessingException ) { /* network: check server/URL */ }
} Prevention
- Verify server URL/port and connectivity before operations
- Ensure the parent folder path exists before creating subfolders
- Check credentials; 401/403 responses surface as this exception
- Retry with backoff on ProcessingException (transient network issues)
When it happens
Trigger: PUT to url+service fails: server unreachable, network timeout, malformed URL, WebApplicationException from a 4xx/5xx response, or ProcessingException from serialization/connection issues.
Common situations: DI/Pentaho server down or wrong port; parent folder path does not exist server-side; authentication failure causing 401/403; firewall/proxy blocking the request.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/78a6a10c064a495c.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/repo-vfs/repo-vfs-ws/src/main/java/org/pentaho/di/plugins/repovfs/ws/repo/RepositoryClient.java:166
if ( tree == null || tree.getChildren() == null ) {
return new RepositoryFileDto[0];
}
return tree.getChildren().stream().map( RepositoryFileTreeDto::getFile ).toArray( RepositoryFileDto[]::new );
}
/** Create folder with given path */
public void createFolder( String filePath ) throws RepositoryClientException {
try {
String path = RepositoryPathEncoder.encodeRepositoryPath( filePath );
String service = cfg.getCreateFolderSvc( path );
WebTarget target = client.target( url + service );
Response response = target.request( MediaType.TEXT_PLAIN ).put( Entity.text(" ") );
if ( response.getStatus() != 200 ) {
throw new RepositoryClientException( String.valueOf( response ) );
}
} catch ( WebApplicationException | ProcessingException e ) {
throw new RepositoryClientException( "Client error creating folder", e );
}
}
public RepositoryFileTreeDto getRoot() {
return fetchChildTree( new String[0] ).orElse( null );
}
/** Download file contents */
public InputStream getData( RepositoryFileDto fileDto ) {
String urlPath = encodePath( fileDto.getPath() );
// TODO: repo endpoint fails for unrecognized file types
String endpoint = url + cfg.getDownloadSvc( urlPath );
log.debug( "getData: " + endpoint );
return client.target( endpoint ).request( MediaType.WILDCARD_TYPE ).get( InputStream.class );
}
/** Download file contents with a buffered input stream of the given size */
public InputStream getData( RepositoryFileDto fileDto, int bufferSize ) {View on GitHub (pinned to f3058517a1)