dbeaver/dbeaver · warning · DBInterruptedException
Data transfer was canceled
Error message
Data transfer was canceled
What it means
Thrown as a DBInterruptedException after producer.transferData returns, when isTransferCanceled(monitor) is true. It is the clean cancellation path: the transfer job's canceling() flag or the monitor's cancel state was set, so the job aborts the current pipe rather than continuing. Not a fault; the message exists so the job reports a structured interruption.
Source
Thrown at plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/DataTransferJob.java:160
throw new DBException("Null consumer");
}
String inputName = producer.getObjectFullName(monitor);
String outputName = consumer.getObjectFullName(monitor);
monitor.beginTask(
NLS.bind(DTMessages.data_transfer_wizard_job_container_name,
CommonUtils.truncateString(inputName, 200),
CommonUtils.truncateString(outputName, 200)), 1);
IDataTransferSettings nodeSettings = settings.getNodeSettings(producer);
try {
//consumer.initTransfer(producer.getDatabaseObject(), consumerSettings, );
IDataTransferProcessor processor = settings.getProcessor() == null ? null : settings.getProcessor().getInstance();
producer.transferData(monitor, consumer, processor, nodeSettings, task, -1);
if (isTransferCanceled(monitor)) {
throw new DBInterruptedException("Data transfer was canceled");
}
totalStatistics.accumulate(producer.getStatistics());
totalStatistics.accumulate(consumer.getStatistics());
consumer.finishTransfer(monitor, false);
} catch (Exception e) {
consumer.finishTransfer(monitor, e, task, false);
log.error("Error transferring data from " + inputName + " to " + outputName, e);
throw e;
} finally {
monitor.done();
}
}
private boolean isTransferCanceled(@NotNull DBRProgressMonitor monitor) {
return monitor.isCanceled() || isCanceled() || (parentMonitor != null && parentMonitor.isCanceled());
}View on GitHub (pinned to 1e5ee1042b)
Solutions
- Treat this as expected control flow: catch DBInterruptedException and surface 'Transfer canceled by user' rather than as a failure.
- If cancel is unexpected, audit code that calls job.cancel() or monitor.setCanceled() upstream.
- For resumable transfers, restart the job; producers/consumers that support resumption will continue.
Example fix
// before
try {
job.transferData(monitor, pipe);
} catch (DBException e) {
log.error("Transfer failed", e); // wrongly logs cancellation as error
}
// after
try {
job.transferData(monitor, pipe);
} catch (DBInterruptedException e) {
log.info("Transfer canceled: " + e.getMessage());
} catch (DBException e) {
log.error("Transfer failed", e);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (monitor.isCanceled()) {
// do not start; or exit gracefully
return;
} Try / catch
try {
job.transferData(monitor, pipe);
} catch (DBInterruptedException e) {
// expected: user/parent canceled; do not treat as error
log.info("Transfer canceled: " + e.getMessage());
} Prevention
- Differentiate DBInterruptedException from real DBException in catch blocks.
- Do not cancel the job monitor unless shutdown is intended.
- Surfaces cancel state to the user as a normal outcome, not a failure.
When it happens
Trigger: The user pressed Cancel in the progress dialog, the job received an IJobManager cancel, or a DBRProgressMonitor passed to the producer was marked canceled mid-stream.
Common situations: User-initiated cancel of a long export/import; a parent operation canceling its children; automated runs with a timeout that cancels the monitor.
Related errors
- Data transfer was canceled
- Deserialization canceled
- `type` attribute is mandatory
- Can't find processor of type '{type}'
- Can not determine target container
AI-assisted analysis of dbeaver/dbeaver@1e5ee1042b (2026-08-13).
Data as JSON: /api/errors/e201363d33aec9ca.
Report an issue: GitHub.