apache/dolphinscheduler · error · IllegalArgumentException
Source path and destination path cannot be the same: ${srcAb
Error message
Source path and destination path cannot be the same: ${srcAbsolutePath} What it means
A self-copy guard inside copy(): the source and destination absolute paths are string-equal, which would make the copy operation a no-op at best or destroy the source when deleteSource=true. The offending input is srcAbsolutePath (identical to dstAbsolutePath); typical triggers are renaming/moving a resource onto itself or a UI edit that kept the same target path.
Source
Thrown at dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/local/LocalStorageOperator.java:93
public boolean exists(String resourceAbsolutePath) {
return Files.exists(Paths.get(resourceAbsolutePath));
}
@SneakyThrows
@Override
public void delete(String resourceAbsolutePath, boolean recursive) {
if (recursive) {
FileUtils.deleteQuietly(new File(resourceAbsolutePath));
} else {
Files.deleteIfExists(Paths.get(resourceAbsolutePath));
}
}
@SneakyThrows
@Override
public void copy(String srcAbsolutePath, String dstAbsolutePath, boolean deleteSource, boolean overwrite) {
if (srcAbsolutePath.equals(dstAbsolutePath)) {
throw new IllegalArgumentException(
"Source path and destination path cannot be the same: " + srcAbsolutePath);
}
if (!exists(srcAbsolutePath)) {
throw new FileNotFoundException("Source path does not exist: " + srcAbsolutePath);
}
if (exists(dstAbsolutePath)) {
if (!overwrite) {
throw new FileAlreadyExistsException("Destination path already exists: " + dstAbsolutePath);
}
delete(dstAbsolutePath, true);
}
final File srcFile = new File(srcAbsolutePath);
final File dstFile = new File(dstAbsolutePath);
if (FileUtils.isDirectory(srcFile)) {
FileUtils.copyDirectoryToDirectory(srcFile, dstFile);View on GitHub (pinned to 02eac45a1b)
Solutions
- Skip the copy when src equals dst instead of erroring, if self-copy is semantically acceptable
- Validate in the resource rename/move API that the destination differs from the source
- Compare canonical paths to catch equivalent paths with different spellings
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/local/LocalStorageOperator.java:93 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/681307aee1cefab8.
Report an issue: GitHub.